[Python-Dev] New syntax for 'dynamic' attribute access

Jack Jansen Jack.Jansen at cwi.nl
Mon Feb 12 09:55:52 CET 2007


On 12-feb-2007, at 0:45, Ben North wrote:

>
>    self.(method_name) = self.metadata.(method_name)

I like the functionality, but I don't like the syntax, to me it looks  
too much like a method call.

To me self.[method_name] = self.metadata.[method_name] looks better:  
what we're doing here is more like dictionary lookup than calling  
functions.
--
Jack Jansen, <Jack.Jansen at cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma  
Goldman




More information about the Python-Dev mailing list