Python language suggestion
Chris Ryland
cpr at emsoftware.com
Fri Jan 12 10:35:40 EST 2001
In article <3A5E9E45.9A59848F at alcyone.com>,
Erik Max Francis <max at alcyone.com> wrote:
> Andrew Dalke wrote:
> > I believe he means
> > foo.'bar bletch'
> > as an alternate way of doing
> > getattr(foo, 'bar bletch')
> > not as foo['bar bletch']
>
> That's not what he said. He explicitly used the subscription notation
> and even said "dictionary-like objects."
No, Andrew's right--I meant the more general getattr(foo, 'bar bletch').
It's a very simple, unambiguous, gentle way to extend the language to
allow slightly out-of-spec attribute names (such as keywords and
multiple words with blanks).
I'll stop now and let the experts debate. ;-)
--
Chris Ryland * Em Software, Inc. * www.emsoftware.com
Sent via Deja.com
http://www.deja.com/
More information about the Python-list
mailing list