A property that stores information about a given class's super-classes is named:
A property that stores information about a given class's super-classes is named:
The property that stores information about a given class's super-classes in Python is '__bases__'. This attribute is a tuple containing references to the base classes. Options like '__upper__', '__super__', and '__ancestors__' do not exist as properties in Python for this purpose.
D. __bases__ __ancestors__ does not exist
Superclasses may be called ancestors, but there is no such property. Answer is D
D is correct
http://www.java2s.com/example/python-book/class-bases-attribute.html class rec: pass # Empty namespace object rec.name = 'Bob' # Just objects with attributes rec.age = 40 # ww w . ja v a2 s.c o m d = rec.__bases__ # Class to superclasses link, () in 2.X #d = rec.__ancestors__ #AttributeError: type object 'rec' has no attribute '__ancestors__' #d = rec.__super__ #AttributeError: type object 'rec' has no attribute '__super__' #d = rec.__upper__ #AttributeError: type object 'rec' has no attribute '__upper__' print( d ) ans D
D is correct