Python2.2 doesn't give members of a list

Skip Montanaro skip at pobox.com
Wed Aug 8 16:27:52 EDT 2001


    Joonas> Why doesn't python22a1 give members of a list with dir(list).
    Joonas> See snippet below.

Chalk that up to type/class unification:

    % ./python
    Python 2.2a1 (#11, Aug  2 2001, 08:51:55) 
    [GCC 2.96 20000731 (Linux-Mandrake 8.0 2.96-0.48mdk)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> dir([].__class__)
    ['__add__', '__class__', '__contains__', ..., 'remove', 'reverse', 'sort']

-- 
Skip Montanaro (skip at pobox.com)
http://www.mojam.com/
http://www.musi-cal.com/




More information about the Python-list mailing list