Python Object-Oriented Programming (OOP) and Fundamentals Review

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/25

flashcard set

Earn XP

Description and Tags

Comprehensive vocabulary flashcards covering Python OOP concepts, inheritance types, special dunder methods, method categories, and core Python internals like memory management and the GIL.

Last updated 2:35 PM on 7/9/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

26 Terms

1
New cards

Class

A blueprint or template for creating objects, similar to a house plan made by an architect.

2
New cards

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.

3
New cards

Method

A function that is defined inside a class.

4
New cards

Inheritance

An OOP concept in which a child class acquires the properties and methods of a parent class to promote code reusability.

5
New cards

Method Overriding

When a child class provides its own version of a method that is already defined in its parent class.

6
New cards

Polymorphism

A concept where the same method name behaves differently for different objects based on their forms.

7
New cards

Abstract Class

A class that cannot be instantiated directly and acts as a blueprint for other classes, forcing child classes to implement certain methods.

8
New cards

Abstract Methods

Methods within an abstract class that have no implementation and must be defined by child classes.

9
New cards

Single Inheritance

A type of inheritance where one child class inherits from exactly one parent class.

10
New cards

Multiple Inheritance

A type of inheritance where one child class inherits from multiple parent classes simultaneously.

11
New cards

Multilevel Inheritance

An inheritance pattern where a child class inherits from a parent, and another child class inherits from that child, following a chain.

12
New cards

Hierarchical Inheritance

An inheritance structure where multiple child classes inherit from the same single parent class.

13
New cards

Hybrid Inheritance

A combination of two or more inheritance types, such as hierarchical and multiple inheritance.

14
New cards

MRO (Method Resolution Order)

The order in which Python searches for a method in a class hierarchy, typically following Child \rightarrow Parent1 \rightarrow Parent2 \rightarrow object.

15
New cards

Dunder Methods

Special methods that start and end with double underscores, such as __init__\text{\_\_init\_\_} and __str__\text{\_\_str\_\_}, allowing behavior definition for built-in operations.

16
New cards

__init__()\text{\_\_init\_\_()}

A dunder method known as a constructor that is called automatically when an object is created.

17
New cards

__str__()\text{\_\_str\_\_()}

A dunder method that controls the string representation of an object when it is printed.

18
New cards

__len__()\text{\_\_len\_\_()}

A dunder method used by the len()\text{len()} function to return the length of an object.

19
New cards

__add__()\text{\_\_add\_\_()}

A dunder method used by the ++ operator to define how objects are added together.

20
New cards

Instance Method

A standard method that works with object data and uses self\text{self} as its first parameter.

21
New cards

Class Method

A method created with the @classmethod\text{@classmethod} decorator that operates on the class itself rather than individual objects and uses cls\text{cls} as its first parameter.

22
New cards

Static Method

A method created with the @staticmethod\text{@staticmethod} decorator that does not depend on class or object data and does not use self\text{self} or cls\text{cls}.

23
New cards

super()\text{super()}

A built-in Python function used in inheritance to access and call methods and constructors from a parent class.

24
New cards

zip()\text{zip()}

A built-in function that combines multiple iterables into a single iterator of tuples by pairing elements based on their index positions.

25
New cards

Python Memory Manager

The system responsible for automatically allocating memory when objects are created and deallocating it when they are no longer referenced.

26
New cards

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.