2.2 features

Guido van Rossum guido at zope.com
Tue Jul 31 07:25:32 EDT 2001


> From: "Guido van Rossum" <guido at python.org>
> 
> > I love it.  'x in type' as a shorthand for isinstance(x, type).
> > Checked into CVS!

[Ken Seehof]

> Very cool.

(Were you the original proposer?  I'd like to honor him/her.)

> While you're at it, how about mapping "in" to "has_key" for
> mapping objects?

Already done.

> >>> 'parrot' in {'parrot': 'dead'}
> 1
> >>> 'dead' in {'parrot': 'dead'}  # obviously "in" refers to keys, not
> values
> 0

Indeed.

> BTW, thanks again for the awesome language.
> I hereby revoke the title ".*[dD]ictator".  I dub thee "Fearless Leader".

If you want to lead, go find a parade and walk in front of it.  (Old
hippy wisdom.)

--Guido van Rossum (home page: http://www.python.org/~guido/)




More information about the Python-list mailing list