Section: Classes and instances

Basic class

python
python
class User:
    def __init__(self, name: str):
        self.name = name

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Classes and instances
Instance method
Instance method
OpenIn sheetpythonsame section
Class variable
Class variable
OpenIn sheetpythonsame section
Class method
Class method
OpenIn sheetpythonsame section
Static method
Static method
OpenIn sheetpythonsame section
Dataclass
Dataclass
OpenIn sheetpythonsame section
Subclass
Subclass
OpenIn sheetpython1 tag match