I want make a method like in the following example
how can I make it in other way ?
Thanks
1 2 3 4 5 6 7 8 9 10 11 12 13 |
class foo(): @ classmethod @instancemethod # problem:NameError: name 'instancemethod' is not defined def method( cls , self ): print ( "method class =" , cls ) print ( "method object =" , self ) example = foo() example.method() #___output___ # method class = ....... # method object = ..... |
Thanks