Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #35888

Re: father class name

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!rt.uk.eu.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!news.nosignal.org!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <dihedral88888@googlemail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.013
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'to:addr:comp.lang.python': 0.09; 'typeerror:': 0.09; 'cc:addr:python-list': 0.10; 'here"': 0.16; 'output?': 0.16; 'subject:class': 0.16; 'wrote:': 0.17; '>>>': 0.18; 'parameters': 0.20; '"",': 0.22; '31,': 0.22; 'object.': 0.22; 'cc:2**0': 0.23; 'monday,': 0.23; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; '(most': 0.27; 'definition': 0.29; 'class': 0.29; 'december': 0.32; 'file': 0.32; 'print': 0.32; 'traceback': 0.33; 'received:google.com': 0.34; 'wrong': 0.34; 'from:addr:googlemail.com': 0.35; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'why': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'takes': 0.39; 'here': 0.65; 'received:209.85.220.184': 0.91
Newsgroups comp.lang.python
Date Tue, 1 Jan 2013 00:37:40 -0800 (PST)
In-Reply-To <mailman.1483.1356927535.29569.python-list@python.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=123.192.32.215; posting-account=5JdMBQoAAABHnS4mjpqEzxnmWtgiiVNw
References <mailman.1483.1356927535.29569.python-list@python.org>
User-Agent G2/1.0
X-Google-Web-Client true
X-Google-IP 123.192.32.215
MIME-Version 1.0
Subject Re: father class name
From 88888 Dihedral <dihedral88888@googlemail.com>
To comp.lang.python@googlegroups.com
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Cc python-list <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Message-ID <mailman.1514.1357045223.29569.python-list@python.org> (permalink)
Lines 20
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1357045223 news.xs4all.nl 6903 [2001:888:2000:d::a6]:56608
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:35888

Show key headers only | View raw


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):
> 
>   File "<stdin>", line 1, in <module>
> TypeError: object.__new__() takes no parameters
> 
> why    haha(object).theprint()  get wrong output?

You don't have to type the base class object.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

father class name contro opinion <contropinion@gmail.com> - 2012-12-31 12:18 +0800
  Re: father class name Roy Smith <roy@panix.com> - 2012-12-30 23:27 -0500
  Re: father class name 88888 Dihedral <dihedral88888@googlemail.com> - 2013-01-01 00:37 -0800
  Re: father class name 88888 Dihedral <dihedral88888@googlemail.com> - 2013-01-01 00:37 -0800

csiph-web