Peter Hansen wrote:

> > Did you put the SI_prefixes  outside the def so you could wrap the
> > whole thing in a module and reuse it in other blocks?
>
> Do "import dis" and then try "dis.dis(myfloat)" on Fredrik's version and
> on your suggested variation...  (Hint, it's likely more an instinct for
> decent performance instead of an instinct for decent portability

I frankly don't see what "portability" has to do with this.  Why would the
location of a reusable static data structure matter ?  Python code work
the same way in scripts and modules...

</F>



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to