[Python-3000] Type parameterization

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Sat May 20 00:12:57 CEST 2006


"Jim Jewett" <jimjjewett at gmail.com> writes:

> __getitem__ on a dictionary instance happens to be defined.
> __getitem__ on the dict class happens not to be defined.

I wouldn't be so sure.

>>> dict.__getitem__
<method '__getitem__' of 'dict' objects>
>>> dict.__getitem__({'one':1}, 'one')
1

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak at knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/


More information about the Python-3000 mailing list