Spaces in object attribute
Michael Hudson
mwh at python.net
Tue Jan 15 06:28:32 EST 2002
"Emile van Sebille" <emile at fenx.com> writes:
> Shouldn't this cause an SyntaxError?
[...]
> >>> obj. attr = 1 # note the space
No, as others explained. Here's another good one:
>>> class C:
... def __getitem__(self, item):
... return item
...
>>> C()[. . .]
Ellipsis
Cheers,
M.
--
You owe The Oracle a TV with an 'intelligence' control - I've
tried 'brightness' but that didn't work.
-- Internet Oracularity #1192-01
More information about the Python-list
mailing list