[Python-3000] Python 3000 Status Update (Long!)

Andrew McNabb amcnabb at mcnabbs.org
Fri Jun 22 21:42:19 CEST 2007


On Fri, Jun 22, 2007 at 01:32:42PM -0600, Neil Toronto wrote:
> > (imap is faster in this case because the built-in name 'abs' is looked
> > up only once -- in the genexp, it's looked up each time, sigh --
> > possibly the biggest "we should REALLY tweak the language to let this
> > be optimized sensibly" gotcha in Python, IMHO).
> 
> What is it about the language as it stands that requires abs() to be 
> looked up each iteration?

Calling abs() could change locals()['abs'], in which case a different
function would be called the next time through.  You lookup 'abs' each
time just in case it's changed.

-- 
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55  8012 AB4D 6098 8826 6868
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.python.org/pipermail/python-3000/attachments/20070622/4bc19635/attachment.pgp 


More information about the Python-3000 mailing list