ReviseAlgo Logo

Object-Oriented Programming

10 Topics
1

Classes and Objects

Defining classes and creating objects

Core OOP concept — frequently asked in interviews to test understanding of class vs instance, memory model, and object lifecycle
2

__init__ Method

Object initialization and constructor patterns

Critical interview topic — understanding __init__ vs __new__, constructor overloading patterns, and initialization best practices
3

Instance Variables

Object-specific data and attribute management

Tests understanding of object state, __dict__, __slots__, and dynamic attribute behavior
4

Class Variables

Shared class-level data and shadowing behavior

Frequently tested — interviewers ask about class variable shadowing, mutable class variables, and class-level registries
5

Methods

Instance, class, and static methods with real-world patterns

Very common — interviewers test your understanding of when to use each method type and how self/cls work
6

self Keyword

Understanding instance reference and method binding

Tests deep understanding of Python object model — method binding, unbound methods, and explicit self passing
7

Properties

Managed attributes with @property decorator

Very common — tests encapsulation, computed properties, and the Pythonic approach to getters/setters
8

Dunder Methods

Magic methods for operator overloading and Python internals

Advanced Python — tests understanding of Python data model, operator overloading, and protocol methods
9

Dataclasses

Simplified class definitions with auto-generated boilerplate

Modern Python (3.7+) — tests knowledge of dataclass features, field options, and when to use vs regular classes
10

__slots__

Memory optimization and attribute control for classes

Performance topic — tests understanding of Python memory model, __dict__ overhead, and optimization techniques