Encapsulation
4 Topics
1
Public and Private Members
Access control conventions in Python
Python conventions — tests understanding of naming conventions, name mangling, and Pythonic encapsulation
2
Name Mangling
Double underscore prefix and attribute name transformation
Python internals — tests deep understanding of name mangling mechanism and its purpose in inheritance
3
Getters and Setters
Pythonic attribute access with @property
Encapsulation — tests understanding of @property, computed attributes, and Pythonic vs Java-style access control
4
Descriptors
Advanced attribute access control via descriptor protocol
Advanced Python — tests understanding of descriptor protocol, __set_name__, and how properties/slots work under the hood