[Python-bugs-list] [ python-Bugs-456420 ] no __methods__ for lists, strings etc.

noreply@sourceforge.net noreply@sourceforge.net
Wed, 29 Aug 2001 00:32:39 -0700


Bugs item #456420, was opened at 2001-08-29 00:32
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=456420&group_id=5470

Category: Type/class unification
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Detlef Lannert (lannert)
Assigned to: Guido van Rossum (gvanrossum)
Summary: no __methods__ for lists, strings etc.

Initial Comment:
With Python 2.2a2+ from cvs, [].__methods__ fails with

AttributeError: 'list' object has no attribute
'__methods__'

Same for a string or a dictionary.

The Library Reference section on "Special Attributes"
(2.1.9 here) still recommends [].__methods__ for
finding out about an object's methods.

dir([]) returns [] and doesn't list the attributes
either.

OK, I can use [].__class__.__dict__.keys() -- but it's
not very intuitive ...

  Detlef


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=456420&group_id=5470