Re: Calling an instance method defined without any 'self' parameter

2018-10-04 Thread Ibrahim Dalal
On Thu, Oct 4, 2018 at 10:20 PM Thomas Jollans wrote: > On 2018-10-04 10:25, Ibrahim Dalal wrote: > > class A: > > def foo(): > > print 'Hello, world!' > > > > a = A()print A.foo # print a.foo # > > >print > > type(A.foo) # > > a.foo() # TypeError: foo() takes n

Re: Calling an instance method defined without any 'self' parameter

2018-10-04 Thread Bob van der Poel
On Thu, Oct 4, 2018 at 1:25 AM Ibrahim Dalal wrote: > class A: > def foo(): > print 'Hello, world!' > > a = A()print A.foo # print a.foo # > >print > type(A.foo) # > a.foo() # TypeError: foo() takes no arguments (1 given) > A.foo() # TypeError: unbound

Re: Calling an instance method defined without any 'self' parameter

2018-10-04 Thread Terry Reedy
On 10/4/2018 4:25 AM, Ibrahim Dalal wrote: class A: def foo(): print 'Hello, world!' a = A()print A.foo # print a.foo # >print type(A.foo) # a.foo() # TypeError: foo() takes no arguments (1 given) A.foo() # TypeError: unbound method foo() must be ca

Re: Calling an instance method defined without any 'self' parameter

2018-10-04 Thread Thomas Jollans
On 2018-10-04 10:25, Ibrahim Dalal wrote: > class A: > def foo(): > print 'Hello, world!' > > a = A()print A.foo # print a.foo # > >print > type(A.foo) # > a.foo() # TypeError: foo() takes no arguments (1 given) > A.foo() # TypeError: unbound method foo