Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'typeerror:': 0.09; 'def': 0.10; 'to:name:python-list': 0.15; '"i': 0.16; 'here"': 0.16; 'here"': 0.16; 'output?': 0.16; 'subject:class': 0.16; '>>>': 0.18; 'parameters': 0.20; '"",': 0.22; '>>>': 0.22; 'subject:problem': 0.22; 'received:74.125.82.174': 0.23; '(most': 0.27; 'message-id:@mail.gmail.com': 0.27; 'skip:& 10': 0.29; 'class': 0.29; 'file': 0.32; 'print': 0.32; 'received:74.125.82': 0.33; 'traceback': 0.33; 'to:addr:python-list': 0.33; 'skip:& 20': 0.33; 'received:google.com': 0.34; 'wrong': 0.34; 'received:74.125': 0.36; 'why': 0.37; 'to:addr:python.org': 0.39; 'takes': 0.39; 'header:Received:5': 0.40; 'here': 0.65 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=9+J4UWfQUcRry/LBoZ+OfouCYau9dLFl5JWZt5mrY04=; b=wn42Wn2R6b3zowtSbb0biOfc2/wp6kk8pzoOiy2JR1C88cGvfsINONdy9ZyV9XuhYo bVlp5BuzZmXAwLxdBv1GfsMPW0tnUlSbGzeZEa9+tcRrn9VdMhghZFYOb/0ViUi4gAOG pcgZPEVaH0fDK7e9cYy286Xv+PbCVsX19K+MZwNpW1x7BWqi1A0nu7jl5VxhC5uUuOEJ yISVYq/rfOBHbV5R5E8VWNRcsTzSLbY4I2YhhJYnFAqz41OpGNCRSVoNgPG5A6H2P1Iz ZqSkNtlB5fPbc0w1eO/EV8XqRhoz7akRMDoZpvKX+/WDOzpPWHpiIv0Mp/wvEirqi0xw W8HQ== MIME-Version: 1.0 Date: Mon, 31 Dec 2012 14:34:19 +0800 Subject: the class problem From: contro opinion To: python-list Content-Type: multipart/alternative; boundary=f46d0444e8a1fae90804d22033ff X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1356935666 news.xs4all.nl 6890 [2001:888:2000:d::a6]:59599 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:35835 --f46d0444e8a1fae90804d22033ff Content-Type: text/plain; charset=ISO-8859-1 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 "", line 1, in TypeError: object.__new__() takes no parameters why haha(object).theprint() get wrong output? --f46d0444e8a1fae90804d22033ff Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable here is my haha=A0 class
class=A0 haha(object):
=A0 def=A0 theprint(s= elf):
=A0 =A0 print "i am here"

>>> haha().the= print()
i am here
>>> haha(object).theprint()
Traceback (= most recent call last):
=A0 File "<stdin>", line 1, in <module>
TypeError:= object.__new__() takes no parameters

why =A0 haha(object).theprint= ()=A0 get wrong output?
--f46d0444e8a1fae90804d22033ff--