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


Groups > comp.lang.python > #93781

Re: Foo.__new__ is what species of method?

Path csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'test,': 0.05; 'filing': 0.07; 'report.': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:method': 0.09; 'typeerror:': 0.09; 'bug': 0.10; ':-)': 0.12; 'def': 0.13; 'argument': 0.15; 'cls': 0.16; 'given)': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'math': 0.20; '"",': 0.22; 'implicit': 0.22; 'thanks,': 0.24; '(most': 0.24; 'header:User- Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'subject:what': 0.29; "i'm": 0.30; 'print': 0.30; 'checked': 0.31; "can't": 0.32; 'skip:_ 10': 0.32; 'class': 0.33; "d'aprano": 0.33; 'hopefully': 0.33; 'steven': 0.33; 'traceback': 0.33; "i'll": 0.33; 'file': 0.34; 'clear': 0.35; 'should': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'takes': 0.39; 'to:addr:python.org': 0.40; 'different': 0.63; 'skip:\xe2 10': 0.70; '8bit%:46': 0.76; '_o__)': 0.84; 'received:125': 0.84; 'glad': 0.87; '8bit%:33': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Ben Finney <ben+python@benfinney.id.au>
Subject Re: Foo.__new__ is what species of method?
Date Tue, 14 Jul 2015 15:17:35 +1000
References <mailman.478.1436849134.3674.python-list@python.org> <55a495ee$0$1580$c3e8da3$5496439d@news.astraweb.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host jigong.madmonks.org
X-Public-Key-ID 0xAC128405
X-Public-Key-Fingerprint 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405
X-Public-Key-URL http://www.benfinney.id.au/contact/bfinney-pubkey.asc
X-Post-From Ben Finney <bignose+hates-spam@benfinney.id.au>
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)
Cancel-Lock sha1:CKPeT/wOwWkK2GTQS+PFd9E7sDU=
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.480.1436851067.3674.python-list@python.org> (permalink)
Lines 22
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1436851067 news.xs4all.nl 2898 [2001:888:2000:d::a6]:40449
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:93781

Show key headers only | View raw


Steven D'Aprano <steve+comp.lang.python@pearwood.info> writes:

> py> class Spam(object):
> ...     def __new__(cls):
> ...             print cls
> ... 
> py> Spam.__new__()  # implicit first arg?
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> TypeError: __new__() takes exactly 1 argument (0 given)

Thanks, I'm glad I checked before filing a bug report.

Hopefully I'll remember that clear test, when I need to remember which
species it is :-)

-- 
 \       “Instead of having ‘answers’ on a math test, they should just |
  `\               call them ‘impressions’, and if you got a different |
_o__)   ‘impression’, so what, can't we all be brothers?” —Jack Handey |
Ben Finney

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


Thread

Foo.__new__ is what species of method? Ben Finney <ben+python@benfinney.id.au> - 2015-07-14 14:45 +1000
  Re: Foo.__new__ is what species of method? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-07-14 14:54 +1000
    Re: Foo.__new__ is what species of method? Ben Finney <ben+python@benfinney.id.au> - 2015-07-14 15:17 +1000
    Re: Foo.__new__ is what species of method? Stefan Behnel <stefan_ml@behnel.de> - 2015-07-14 08:26 +0200

csiph-web