Posts by gil9red • 126 points
1 post
-
1
votes1
answer85
viewsA: How to declare and use methods that are in the same class
class ClasseEMetodo: @classmethod def retorna_valor(cls): return '10' @classmethod def imprimi_valor(cls): print('O valor é {0}'.format(cls.retorna_valor())) # chamada var = ClasseEMetodo…