This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skip.montanaro
Recipients
Date 2004-10-28.18:08:16
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Calling this a bug in Python is probably a misnomer.
Think of it as more of a "request for workaround".
Recent versions of SWIG create wrapper classes that
contain a Python class as a key in their __dict__'s.
Consequently, something like

    [k for k in dir(obj) if k.startswith("set_")]

because there is an element in dir(obj) that's not a
string or a unicode object.

I realize dir() is mostly a debugging aid, unlikely to be
used frequently in production code, but I'd like see the
docs updated so that it's guaranteed to only return
strings or unicode objects and I'd like its implementation
changed to enforce that (and maybe even warn if
something else is found).

If this is seen as an acceptable change I will work up a
patch.
History
Date User Action Args
2008-01-20 09:57:16adminlinkissue1056293 messages
2008-01-20 09:57:16admincreate