Quoted identifiers in Python?
Erik Max Francis
max at alcyone.com
Thu Mar 29 11:02:12 EST 2001
Eddie and Babs wrote:
> NOW... would this be a good thing for Python to have in the future? It
> would
> make element access consistent with subscripting:-
>
> x = obj."Ivor the engine"
>
> ...would be the same as
>
> x = obj["Ivor the engine"]
>
> ..no?
I would hope they would not be the same, since one invokes __getattr__
while the other invokes __getitem__. They're different things, they
shouldn't be forced to be the same thing.
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/ \ Traveler, there are no paths. Paths are made by walking.
\__/ Antonio Machado
REALpolitik / http://www.realpolitik.com/
Get your own customized newsfeed online in realtime ... for free!
More information about the Python-list
mailing list