MiKМда, смотрю все очень плохо. Почитай у Лутца, что такое статические методы….
Ну это статический метод,
MiKМда, смотрю все очень плохо. Почитай у Лутца, что такое статические методы….
Ну это статический метод,
class A: @staticmethod def hello(world): print("Hello, {}!".format(world)) a = A() a.hello('world') name = 'A' title = 'B' a.hello(name) a.hello(title)
class A: def hello(self, world): print("Hello, {}!".format(world)) a = A() a.hello('world') name = 'A' title = 'B' a.hello(name) a.hello(title)
MiK
Ну это статический метод, я так понял. А в чём пример?
Вы - тупой неуч корчащий из себя бог весть что.И я тебя не оскорблял.
MiK
И я тебя не оскорблял.
MiK
но боюсь ты её не сможешь принять
MiK
С троллями только так.
class A(object): def not_static(self, a): return a @staticmethod def static(a): return a print A.static(12) print A.not_static(12)
class A( def not_static(self, a): return a @staticmethod def static(a): return a print A.static(12) print A.not_static(12)
MiKЧто сказать то? 4kpt_III плохого ни когда ещё не подсказывал и тут он тоже прав.
Скажите ему хоть кто-то!