[Python-Dev] Documentation for __new__

Steven Bethard steven.bethard at gmail.com
Sat Mar 5 21:32:26 CET 2005


On Sat, 5 Mar 2005 11:39:42 -0500, Greg Ward <gward at python.net> wrote:
> On 05 March 2005, Nick Coghlan said:
> > Steven Bethard has put together some text to add __new__ to the list of
> > Basic Customisation methods in the language reference. Would one of the
> > documentation folks care to take a look at it?
[snip]
>   Typical usage is to create a new instance of the class by
>   invoking the superclass's __new__() method using
>   "super(currentclass, cls).__new__([...])"

Sorry I didn't catch this originally, but this should be
    "super(currentclass, cls).__new__(cls[, ...])"
since __new__ is a staticmethod.

Steve Bethard
-- 
You can wordify anything if you just verb it.
        --- Bucky Katt, Get Fuzzy


More information about the Python-Dev mailing list