[IronPython] bug in dir() function??

Steven Drucker sdrucker at microsoft.com
Wed Aug 17 23:49:05 CEST 2005

It looks like the dir() function does not list the functions for
superclasses (either dirring the class or instance variable).



            class foo():

                        def foofunc(self):

                                    print 'foofunc';


            class bar(foo):

                        def barfunc(self):

                                    print 'barfunc';



In cpython:

a = bar();

dir(a) produces the following:

 ['__doc__', '__module__', 'barfunc', 'foofunc']



But in IronPython [version 0.9.2306] this produces:

a = bar();

dir(a) produces

['__doc__', 'barfunc']


The superclasses functions are all callable (a.foofunc() works).


This same bug is there for inheriting from .NET classes, though of
course .NET classes that inherit from other .NET classes show all
pertinent functions.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20050817/70f07217/attachment.html>

More information about the Ironpython-users mailing list