Python Language OOP
Jump to navigation
Jump to search
External
Internal
Overview
Attributes and methods.
Class
class MyClass:
def __init__(self):
pass
The class may be declared with parentheses, but the IDE static checks find those as "redundant":
class MyClass():
...
Methods
Special Methods
__str__()
__str__()
is used by print()
, str()
and the string formatters to produce a string representation of an instance.
Static Methods
Initialization
Inheritance
Overriding
Polymorphism
.