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
This section is not available anymore. Please use the main Exam Page.PCAP Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
seaverick
1 year, 5 months agoMallie
2 years, 6 months agoBaldridge
3 years, 1 month ago666_m
3 years, 1 month agomacxsz
3 years, 2 months ago