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.
SubscribeRelated
__init__class definitionclass objectinstance objectmethod objectclass variableinstance variablenamespaces