Python Class Inheritance

Descripción

Create a Python class that inherits from a parent class


File Template: ❌


Prefix

class:inherit


Scopes

python


Snippet de código

class ${2:ChildClass}(${1:ParentClass}):
	def __init__(self, ${3:args}):
		super().__init__($3)
		${4:# child attributes here}

	${5:def child_method(self):}
		${6:pass}