0

Which method will be executed first

class Sample: @staticmethod def sample(self): return("static method") @classmethod def sample(self): return("class method") print(Sample.sample)

14th Oct 2018, 5:12 PM
Rakesh Kumar N
Rakesh Kumar N - avatar
1 Resposta
+ 1
only the class method will be executed because it was declared last.
14th Oct 2018, 5:56 PM
Ulisses Cruz
Ulisses Cruz - avatar