Georg Brandl wrote:

> For the speed argument -- there were quite a few proposals to take builtins as
> constants under certain conditions, in which case getattr() usage could be
> optimized just as well as new syntax.

Even more aggressively, the compiler could recognise it
and make a direct call to the __getattr__ method, or
maybe even have a new opcode for doing that.

In other words, "special syntax" doesn't necessarily
have to look like special syntax. :-)

--
Greg
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to