[Python-Dev] New syntax for 'dynamic' attribute access
Nick Coghlan
ncoghlan at gmail.com
Mon Feb 12 16:02:18 CET 2007
Ben North wrote:
> Thanks for the comments so far on this.
Count me as a +0 on the general idea, -1 on the specific proposed syntax
(based on the 'syntax shall not look like grit on Tim's monitor'
guideline, and the fact that nested parentheses make it hard to separate
the dynamic attribute lookup from function calls in the same expression)
I'd probably be +0 for a "x.{some_str}" brace based syntax, with the
caveat that I think this would also prevent future use of the
"x{whatever}" syntax. The 'probably' is based on the fact that I'd like
to see some examples of standard library code converted to that syntax.
And a -1 on the two argument version either way (we can keep getattr
around for that).
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
More information about the Python-Dev
mailing list