Re: __bases__ attribute on classes not displayed by dir() command

2016-02-04 Thread ast
"eryk sun" a écrit dans le message de news:mailman.49.1454576255.30993.python-l...@python.org... On Thu, Feb 4, 2016 at 2:03 AM, ast wrote: but if I am using dir to display all Carre's attributes and methods, __bases__ is not on the list. Why ? The __bases__ property is defined by the meta

Re: __bases__ attribute on classes not displayed by dir() command

2016-02-04 Thread eryk sun
On Thu, Feb 4, 2016 at 2:03 AM, ast wrote: > but if I am using dir to display all Carre's attributes and methods, > __bases__ is not on the list. Why ? The __bases__ property is defined by the metaclass, "type". dir() of a class doesn't show attributes from the metaclass [1]. Because dir() i

__bases__ attribute on classes not displayed by dir() command

2016-02-04 Thread ast
Hi I have a Carre class which inherit from a Rectangle class. Carre has a __bases__ tuple attribute which contains the classes which it inherit from. Carre.__bases__ (,) and Rectangle only inherit from object, so: Rectangle.__bases__ (,) Thats OK but if I am using dir to display all Carr