Skip to content
masterclass Buddy

Python · Class

object

Python classes bundle data and behavior into a new object type. Instances can keep their own state and use methods defined by the class.

Last updated

Syntax

class ClassName:
    ...

instance = ClassName(arguments)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • __init__
  • class definition
  • class object
  • instance object
  • method object
  • class variable
  • instance variable
  • namespaces

Source: 9. Classes — Python 3.15.2 documentation. Checked 2026-11-03.