question about the id()

Giovanni Bajo noway at sorry.com
Mon May 16 21:02:02 EDT 2005


Peter Dembinski wrote:

>> BTW, a typical performance optimization (not done automatically by
>> python) is to hoist unchanging-value expressions out of loops, and
>> obj.method is often such an expression, so you will this strategy
>> when people try
>> to squeeze extra performance from their programs.
>
> Good to know.  Is there any advanced optimizer for Python code, which
> would do such things for me (or suggest them, like pychecker does
> for readability)?


Prove that a.f() would not change the meaning of "a.f" after its invokation is
close to impossible.
-- 
Giovanni Bajo





More information about the Python-list mailing list