- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are built-in class attributes in Python?
According to Python docs, the following are the built-In Class Attributes
Every Python class keeps following built-in attributes and they can be accessed using dot (.) operator like any other attribute:
classname• __dict__ : Dictionary containing the class's namespace.
classname• __doc__ : Class documentation string or None if undefined.
classname• __name__: Class name.
classname• __module__: Module name in which the class is defined.
– This attribute is "__main__" in interactive mode.
classname• __bases__ : A possibly empty tuple containing the base classes, in the order of their occurrence in the base class list.
- Built-In Class Attributes in Python
- What are Python function attributes?
- What does built-in class attribute __dict__ do in Python?
- What does built-in class attribute __doc__ do in Python?
- What does built-in class attribute __name__ do in Python?
- What does built-in class attribute __module__ do in Python?
- What does built-in class attribute __bases__ do in Python?
- Class & Instance Attributes in Python
- When are python classes and class attributes garbage collected?
- What are conditional attributes in C#?
- What are obsolete attributes in C#?
- What are predefined attributes in C#?
- What are the attributes in C#?
- What are event attributes in jQuery?
- What are the attributes of a file object in Python?