[Python-Dev] New syntax for 'dynamic' attribute access (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Mon Feb 12 10:14:52 CET 2007
- Previous message: [Python-Dev] New syntax for 'dynamic' attribute access
- Next message: [Python-Dev] New syntax for 'dynamic' attribute access
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] New syntax for 'dynamic' attribute access
- Next message: [Python-Dev] New syntax for 'dynamic' attribute access
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]