[IPython-dev] wildcard patch
jorgen.stenarson at bostream.nu
Sat Nov 12 05:38:07 CST 2005
I have discovered a problem with the wildcard functionality.
As it is written now it will only match attributes in an object that are
present in its __dict__, and only if there is no __dict__ for the object
it builds one by calling dir(object). This means inherited attributes
will not be visible for objects with a __dict__. Which means there will
be a mismatch between the results you get using dir(object) compared to
An example of this problem can be found by subclassing dict
In :class test(dict):
The attached patch builds the namespace by calling dir on all objects,
this should make the wildcard search more consistent with dir. But the
operation of dir is not well specified and may change between releases
of python. So if someone feels the operation of ?* should be more well
defined I'm open to suggestions on how to go about that.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the IPython-dev