Attitude about new keywords
Martijn Faassen
m.faassen at vet.uu.nl
Sun Feb 9 17:26:18 EST 2003
Paul Rubin <phr-n2003b at nospamnightsong.com> wrote:
> In fact I'd say Python could use quite a few new keywords, where it
> currently uses __xxx__ variables. People often compare Python's
> indentation to Lisp's parentheses as the "initially annoying feature
> that you learn to love". But I'd say __ is more in that category.
>
> Examples: IMO,
>
> 1. in a class definition,
>
> class foo(object):
> __slots__ = ['name', 'address', 'zip]
>
> would be better as
>
> class foo(object):
> slots: name, address, zip
[snip more examples]
I rather like the __foo__ standing out saying "here something special
is happening". When you use a __foo__ construction often you're telling the
language that it should behave differently from its default behavior.
Now it's likely also what one's used to, but I wouldn't want to discount
this potential advantage of the '__' to start with.
Regards,
Martijn
--
History of the 20th Century: WW1, WW2, WW3?
No, WWW -- Could we be going in the right direction?
More information about the Python-list
mailing list