On Dec 29, 5:17 pm, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Fri, 29 Dec 2006 07:57:30 -0800, [EMAIL PROTECTED] wrote: > > What do you mean? Can you specify which special functions you don't > > see? > > I get: > > py> class X: > > pass > > py> dir(X) > > ['__doc__', '__module__']How about these? > > >>> X.__dict__{'__module__': '__main__', '__doc__': None}>>> X.__name__ > 'X' > >>> X.__bases__() > > Now that's interesting... if __name__ and __bases__ don't live in the > class __dict__, where do they live? What other methods and attributes are > invisibly in X? > > -- > Steven.
Well, then we have to lookup what dir() does -- http://docs.python.org/lib/built-in-funcs.html -- it tries to bring up the interesting attributes of an object, apparently __name__ and __bases__ are considered to be not so interesting.... -- http://mail.python.org/mailman/listinfo/python-list