Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python static methods

class A(object):

    @staticmethod
    def stat_meth():
        print("Look no self was passed")
>>> a = A()
>>> a.stat_meth()
Look no self was passed
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #python #static #methods
ADD COMMENT
Topic
Name
7+9 =