| 1 | How do properties and descriptors interact with __slots__, and what special consideration is needed? Python › Descriptors & Properties | Python | Descriptors & Properties | Advanced |
| 2 | What does the @property decorator do, and how does it let a method be accessed like an attribute? Python › Descriptors & Properties | Python | Descriptors & Properties | Beginner |
| 3 | How do you add a setter to a property so assignment (obj.attr = value) triggers custom logic, like validation? Python › Descriptors & Properties | Python | Descriptors & Properties | Beginner |
| 4 | How would you convert an existing plain attribute into a property later, without breaking any existing code that reads or writes it directly? Python › Descriptors & Properties | Python | Descriptors & Properties | Beginner |
| 5 | What is a descriptor, and which dunder methods define the descriptor protocol? Python › Descriptors & Properties | Python | Descriptors & Properties | Intermediate |
| 6 | What is the difference between a data descriptor and a non-data descriptor, and how does this affect attribute lookup priority? Python › Descriptors & Properties | Python | Descriptors & Properties | Intermediate |
| 7 | How does __set_name__ let a descriptor automatically learn the attribute name it's being assigned to on the owning class? Python › Descriptors & Properties | Python | Descriptors & Properties | Intermediate |
| 8 | How would you implement a lazy, cached property using a custom descriptor (or functools.cached_property) that only computes its value once? Python › Descriptors & Properties | Python | Descriptors & Properties | Advanced |
| 9 | How do you write a descriptor that behaves differently when accessed on the CLASS itself versus on an INSTANCE? Python › Descriptors & Properties | Python | Descriptors & Properties | Advanced |
| 10 | How would you implement a type-validating descriptor that enforces a specific type constraint, reusable across multiple attributes and classes? Python › Descriptors & Properties | Python | Descriptors & Properties | Advanced |
| 11 | How does Python's own implementation of instance methods use the descriptor protocol to achieve automatic 'self' binding? Python › Descriptors & Properties | Python | Descriptors & Properties | Advanced |
| 12 | How do you implement a descriptor-based ORM-style field that lazily loads related data only when actually accessed? Python › Descriptors & Properties | Python | Descriptors & Properties | Advanced |
| 13 | How would you write a descriptor supporting attribute DELETION via __delete__, and what real use case does that enable? Python › Descriptors & Properties | Python | Descriptors & Properties | Advanced |
| 14 | How would you use a WeakKeyDictionary inside a descriptor to store per-instance data without relying on the instance's own __dict__ or requiring a dedicated __slots__ entry? Python › Descriptors & Properties | Python | Descriptors & Properties | Advanced |
| 15 | How does @property's read-only behavior (no setter defined) actually raise an AttributeError, and how would you customize that error message? Python › Descriptors & Properties | Python | Descriptors & Properties | Advanced |
| 16 | How do you destructure properties out of an object? JavaScript › Destructuring, Spread & Rest | JavaScript | Destructuring, Spread & Rest | Beginner |
| 17 | What are class fields, and how do they differ from constructor-assigned properties? JavaScript › Classes & Class Syntax | JavaScript | Classes & Class Syntax | Intermediate |
| 18 | What is a metaclass in Python, and what is the default metaclass for all classes? Python › Metaclasses & Class Customization | Python | Metaclasses & Class Customization | Beginner |
| 19 | How does __call__ let an instance of a class be invoked like a function? Python › Magic Methods & Operator Overloading | Python | Magic Methods & Operator Overloading | Intermediate |
| 20 | How do you implement custom attribute access with __getattr__ versus __getattribute__? Python › Magic Methods & Operator Overloading | Python | Magic Methods & Operator Overloading | Intermediate |
| 21 | What role does the class namespace dict play during class creation, and how can __prepare__ customize it? Python › Metaclasses & Class Customization | Python | Metaclasses & Class Customization | Intermediate |
| 22 | How does __set_name__ let a descriptor discover the attribute name it's assigned to within a class? Python › Metaclasses & Class Customization | Python | Metaclasses & Class Customization | Intermediate |
| 23 | What is a mixin class, and how does it differ from a typical base class in multiple inheritance? Python › Multiple Inheritance & MRO | Python | Multiple Inheritance & MRO | Intermediate |
| 24 | How would you implement a custom, memory-efficient data structure using __slots__ instead of a regular class with a __dict__? Python › Data Types & Structures | Python | Data Types & Structures | Advanced |
| 25 | What is functools.cached_property and how does it differ from @property combined with manual caching? Python › functools & Functional Programming Tools | Python | functools & Functional Programming Tools | Advanced |
| 26 | Why is caution needed when applying @lru_cache directly to instance methods? Python › functools & Functional Programming Tools | Python | functools & Functional Programming Tools | Advanced |
| 27 | How does __slots__ interact with magic methods and instance attribute storage? Python › Magic Methods & Operator Overloading | Python | Magic Methods & Operator Overloading | Advanced |
| 28 | Why can't you freely mix two classes with different, incompatible metaclasses in multiple inheritance? Python › Metaclasses & Class Customization | Python | Metaclasses & Class Customization | Advanced |
| 29 | How can a metaclass be used to implement the Singleton design pattern more robustly than overriding __new__ alone? Python › Metaclasses & Class Customization | Python | Metaclasses & Class Customization | Advanced |
| 30 | How does Python handle attribute (not just method) resolution across multiple inheritance, and can it lead to surprising shadowing? Python › Multiple Inheritance & MRO | Python | Multiple Inheritance & MRO | Advanced |