Sylvain Ferriol wrote: > can you explain why python does not see difference between instance > method and class method, having the same name
You're trying to put two objects with the same name in the same namespace. > example > >>> class toto(object): > ... def f(self): > ... print('instance method') > ... @classmethod > ... def f(cls): > ... print('class method') > ... > >>> t=toto() > >>> t.f > <bound method type.f of <class '__main__.toto'>> > >>> t.f() > class method > >>> toto.f() > class method > > if i do the same in ruby: Python works better if you use it to write Python programs. </F> -- http://mail.python.org/mailman/listinfo/python-list