Python Language OOP: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 20: Line 20:
   ...
   ...
</syntaxhighlight>
</syntaxhighlight>
==<span id='Method'></span>Methods==
==<span id='Static_Method'></span>Static Methods==


=Initialization=
=Initialization=

Revision as of 20:33, 15 March 2022

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

Static Methods

Initialization

Inheritance

Overriding

Polymorphism

.