What is the purpose of the __dict__ attribute? #51
Answered
by
lukasmiller3
lukasmiller1
asked this question in
Q&A
-
|
What is the purpose of the dict attribute? |
Beta Was this translation helpful? Give feedback.
Answered by
lukasmiller3
Jan 22, 2026
Replies: 1 comment
-
|
A:dict is a dictionary containing the object's attributes. It's mutable and can be modified directly. Classes also have dict for class attributes. Using slots can replace dict to save memory, but limits dynamic attribute assignment. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
lukasmiller1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A:dict is a dictionary containing the object's attributes. It's mutable and can be modified directly. Classes also have dict for class attributes. Using slots can replace dict to save memory, but limits dynamic attribute assignment.