QuestionQ76

VerifiedAdvanced Object-Oriented Programming

Select the correct statement concerning the __dict__ attribute.

Explanation

The __dict__ attribute is the mapping used to store an object's writable attributes; this applies to classes and to ordinary instances. By contrast, base classes are represented by __bases__, an instance’s class by __class__, and a class’s name by __name__. Instances that use __slots__ may be an exception and not have a __dict__.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!