Skip to contents

The static_ decorator is used to declare a method as a static method in a class definition. Static methods do not refer to self, i.e. the first argument is not the instance of the class.

A static method is a method that belongs to the class itself, rather than to instances of the class. TO-DO: It can be called without creating an instance of the class.

Usage

static_(attribute)

Arguments

attribute

The function to be declared as a static method.