On Monday, December 31, 2012 12:18:48 PM UTC+8, contro opinion wrote:
here is my haha class
class haha(object):
def theprint(self):
print i am here
The definition of a class named haha.
haha().theprint()
i am here
haha(object).theprint()
Traceback (most recent call last):
Chris Rebert c...@rebertia.com writes:
By contrast, in the first part of the *expression*
`haha(object).theprint()`, you passed an argument (namely, `object`).
Since __init__() wasn't expecting any arguments whatsoever, you
therefore got an error.
Why is everyone talking about the
On Mon, Dec 31, 2012 at 1:23 AM, Ben Finney ben+pyt...@benfinney.id.au wrote:
Chris Rebert c...@rebertia.com writes:
By contrast, in the first part of the *expression*
`haha(object).theprint()`, you passed an argument (namely, `object`).
Since __init__() wasn't expecting any arguments
On Mon, 31 Dec 2012 20:23:44 +1100, Ben Finney wrote:
Chris Rebert c...@rebertia.com writes:
By contrast, in the first part of the *expression*
`haha(object).theprint()`, you passed an argument (namely, `object`).
Since __init__() wasn't expecting any arguments whatsoever, you
therefore
here is my haha class
class haha(object):
def theprint(self):
print i am here
haha().theprint()
i am here
haha(object).theprint()
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: object.__new__() takes no parameters
why haha(object).theprint() get wrong
In article mailman.1483.1356927535.29569.python-l...@python.org,
contro opinion contropin...@gmail.com wrote:
here is my haha class
class haha(object):
def theprint(self):
print i am here
haha().theprint()
i am here
haha(object).theprint()
Traceback (most recent call last):
On 2012.12.30 22:18, contro opinion wrote:
here is my haha class
class haha(object):
def theprint(self):
print i am here
haha().theprint()
i am here
haha(object).theprint()
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: object.__new__() takes no
On Sun, Dec 30, 2012 at 8:18 PM, contro opinion contropin...@gmail.com wrote:
here is my haha class
class haha(object):
def theprint(self):
print i am here
haha().theprint()
i am here
haha(object).theprint()
Traceback (most recent call last):
File stdin, line 1, in module