<br><br><div class="gmail_quote">On Fri, Mar 18, 2011 at 3:01 PM, Jean-Michel Pichavant <span dir="ltr"><<a href="mailto:jeanmichel@sequans.com">jeanmichel@sequans.com</a>></span> wrote: <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Don't check for bounds, fix any bug in the code that would set your values out of bounds and use asserts while debugging.<br>
<br>
Otherwise if you really need dynamic checks, it will cost you cpu, for sure. Howeverver you could for instance override the __setatttr__ of state object, and call the attribute's associated function.<br></blockquote>
<div><br></div><div>If the codes something critical (i.e. it's used for financial calculations, hardware control, etc.) it's probably safer to test it dynamically, unless you only have a finite number of inputs/outputs it's often hard to ensure you've fixed all the bugs.</div>
</div><br clear="all">Katie<br>-- <br>CoderStack<br><a href="http://www.coderstack.co.uk" target="_blank">h</a>ttp://<a href="http://www.coderstack.co.uk/perl-jobs">www.coderstack.co.uk/perl-jobs</a><br>The Software Developer Job Board<br>