Path: csiph.com!usenet.pasdenom.info!news.albasani.net!news.roellig-ltd.de!open-news-network.org!border2.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed8.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.064 X-Spam-Evidence: '*H*': 0.88; '*S*': 0.00; 'receives': 0.03; 'static': 0.03; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:method': 0.09; 'bug': 0.10; 'python': 0.10; 'argument.': 0.16; 'method::': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'all,': 0.20; 'implicit': 0.22; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'subject:what': 0.29; 'says': 0.32; 'class': 0.33; 'url:python': 0.33; 'instance': 0.35; 'but': 0.36; 'should': 0.36; 'instead': 0.36; 'url:org': 0.36; 'url:library': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'method': 0.37; 'say': 0.37; 'received:org': 0.37; 'skip:o 20': 0.38; 'does': 0.39; 'takes': 0.39; 'to:addr:python.org': 0.40; 'called': 0.40; 'url:3': 0.60; 'your': 0.60; 'elsewhere': 0.66; 'japan': 0.66; 'warm': 0.67; 'skip:\xe2 10': 0.70; 'receive': 0.71; '8bit%:43': 0.72; '8bit%:46': 0.76; '_o__)': 0.84; 'received:125': 0.84; 'url:datamodel': 0.84; 'url:functions': 0.84; 'url:html#object': 0.84; 'url:reference': 0.91; 'room,': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Foo.__new__ is what species of method? Date: Tue, 14 Jul 2015 14:45:25 +1000 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:m1ZN4/4bayzEyT7MPbBjwcRSoaY= 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: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1436849134 news.xs4all.nl 2929 [2001:888:2000:d::a6]:57089 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:93776 Howdy all, The Python reference says of a class ‘__new__’ method:: object.__new__(cls[, ...]) Called to create a new instance of class cls. __new__() is a static method (special-cased so you need not declare it as such) that takes the class of which an instance was requested as its first argument. But a “static method” is described, elsewhere in the documentation , as “A static method does not receive an implicit first argument”. What the ‘__new__’ documentation describes would match a “class method” “A class method receives the class as implicit first argument”. I suspect this a bug in the reference documentation for ‘__new__’, and it should instead say “__new__ is a class method …”. Am I wrong? -- \ “Cooles & Heates: If you want just condition of warm in your | `\ room, please control yourself.” —air conditioner instructions, | _o__) Japan | Ben Finney