Python2.2 doesn't give members of a list

Joonas Paalasmaa joonas at olen.to
Wed Aug 8 15:48:36 EDT 2001


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


C:\>python22
Python 2.2a1 (#21, Jul 18 2001, 04:25:46) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> dir([])
[]
>>>
C:\>python20
Python 2.0 (#8, Oct 16 2000, 17:27:58) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> dir([])
['append', 'count', 'extend', 'index', 'insert', 'pop', 'remove',
'reverse',
'sort']
>>>
C:\>python16
Python 1.6 (#0, Sep  5 2000, 08:16:13) [MSC 32 bit (Intel)] on win32
Copyright (c) 1995-2000 Corporation for National Research Initiatives.
All Rights Reserved.
Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
All Rights Reserved.
>>> dir([])
['append', 'count', 'extend', 'index', 'insert', 'pop', 'remove',
'reverse',
'sort']
>>>



More information about the Python-list mailing list