[Python-Dev] SWIG and rlcompleter
mwh at python.net
Tue Aug 16 13:35:43 CEST 2005
jepler at unpythonic.net writes:
> You don't need something like a buggy SWIG to put non-strings in dir().
>>>> class C: pass
>>>> C.__dict__ = "bad wolf"
> [3, '__doc__', '__module__']
> This is likely to happen "legitimately", for instance in a class that allows
> x.y and x['y'] to mean the same thing. (if the user assigns to x)
I wonder if dir() should strip non-strings?
<radix> A VoIP server "powered entirely by stabbing, that I made
out of this gun I had" -- from Twisted.Quotes
More information about the Python-Dev