Section: Inheritance and protocols

Subclass

python
python
class Admin(User):
    def can_delete(self) -> bool:
        return True

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 Inheritance and protocols
Call super
Call super
OpenIn sheetpythonsame section
Property getter/setter
Property getter/setter
OpenIn sheetpythonsame section
ABC abstract method
ABC abstract method
OpenIn sheetpythonsame section
Basic class
Basic class
OpenIn sheetpython1 tag match
Class method
Class method
OpenIn sheetpython1 tag match
Static method
Static method
OpenIn sheetpython1 tag match