1/25
Comprehensive vocabulary flashcards covering Python OOP concepts, inheritance types, special dunder methods, method categories, and core Python internals like memory management and the GIL.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Class
A blueprint or template for creating objects, similar to a house plan made by an architect.
Object
An actual instance created from a class; for example, if the class is a house plan, the object is the actual house built from that plan.
Method
A function that is defined inside a class.
Inheritance
An OOP concept in which a child class acquires the properties and methods of a parent class to promote code reusability.
Method Overriding
When a child class provides its own version of a method that is already defined in its parent class.
Polymorphism
A concept where the same method name behaves differently for different objects based on their forms.
Abstract Class
A class that cannot be instantiated directly and acts as a blueprint for other classes, forcing child classes to implement certain methods.
Abstract Methods
Methods within an abstract class that have no implementation and must be defined by child classes.
Single Inheritance
A type of inheritance where one child class inherits from exactly one parent class.
Multiple Inheritance
A type of inheritance where one child class inherits from multiple parent classes simultaneously.
Multilevel Inheritance
An inheritance pattern where a child class inherits from a parent, and another child class inherits from that child, following a chain.
Hierarchical Inheritance
An inheritance structure where multiple child classes inherit from the same single parent class.
Hybrid Inheritance
A combination of two or more inheritance types, such as hierarchical and multiple inheritance.
MRO (Method Resolution Order)
The order in which Python searches for a method in a class hierarchy, typically following Child → Parent1 → Parent2 → object.
Dunder Methods
Special methods that start and end with double underscores, such as __init__ and __str__, allowing behavior definition for built-in operations.
__init__()
A dunder method known as a constructor that is called automatically when an object is created.
__str__()
A dunder method that controls the string representation of an object when it is printed.
__len__()
A dunder method used by the len() function to return the length of an object.
__add__()
A dunder method used by the + operator to define how objects are added together.
Instance Method
A standard method that works with object data and uses self as its first parameter.
Class Method
A method created with the @classmethod decorator that operates on the class itself rather than individual objects and uses cls as its first parameter.
Static Method
A method created with the @staticmethod decorator that does not depend on class or object data and does not use self or cls.
super()
A built-in Python function used in inheritance to access and call methods and constructors from a parent class.
zip()
A built-in function that combines multiple iterables into a single iterator of tuples by pairing elements based on their index positions.
Python Memory Manager
The system responsible for automatically allocating memory when objects are created and deallocating it when they are no longer referenced.
GIL (Global Interpreter Lock)
A mechanism in CPython that allows only one thread to execute Python bytecode at a time, protecting memory management and ensuring thread safety.