Message60592
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.
|
|
Date |
User |
Action |
Args |
2008-01-20 09:57:16 | admin | link | issue1056293 messages |
2008-01-20 09:57:16 | admin | create | |
|