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: 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 Subject: Re: Foo.__new__ is what species of method? Date: Tue, 14 Jul 2015 15:17:35 +1000 References: <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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 Steven D'Aprano writes: > py> class Spam(object): > ... def __new__(cls): > ... print cls > ... > py> Spam.__new__() # implicit first arg? > Traceback (most recent call last): > File "", line 1, in > 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