. Python 2.1 function attributes

Tim Peters tim.one at home.com
Sat Jan 27 18:12:12 EST 2001


[Robin Becker]
> yes I figured it was a bit funny, but nastier things are proposed and
> aren't laughed off.

By whom?  They're *scowled* off by Guido, and that's all that counts in the
end.

> -why don't we have $ and @ and \ operators-ly yrs-

Because so far, Guido hates them.  This is usually something you can count
on for life.  But, e.g., in the past he disliked the idea of being able to
say

    if key in dict:

instead of

    if dict.has_key(key):

because in the first form it's not 100% clear whether you're asking if key
is in dict.keys() or dict.values() or dict.items().  In a once-per-decade
reversal, he changed his mind about that last week, and Thomas Wouters
graciously implemented it for 2.1.

It's a nice addition.  People will complain about it, and some bitterly, but
so it goes.

when-people-disagree-not-everyone-gets-what-they-want-ly y'rs - tim





More information about the Python-list mailing list