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


Groups > comp.lang.python > #70900

Re: Why has __new__ been implemented as a static method?

From Terry Reedy <tjreedy@udel.edu>
Subject Re: Why has __new__ been implemented as a static method?
Date 2014-05-03 16:32 -0400
References <lk2gt6$72f$1@ger.gmane.org>
Newsgroups comp.lang.python
Message-ID <mailman.9668.1399149214.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 5/3/2014 6:37 AM, Jurko Gospodnetić wrote:
>    Hi all.
>
>    I was wandering why Python implements its __new__ method as a static
> and not a class method?

For a technical internal reason that Guido and maybe others have 
explained on pydev (more than once). I forget the details partly because 
I do not care beyond knowing that there is a reason. You might be able 
to find something by searching the pydev archives at gmane.org for 
'__new__ static method'. In other words, Guido knows that it 'should' be 
a class method, if it could be.

>    Normally, I'd chalk this issue up under 'bike-shedding', but it came
> up while teaching others about Python and so does not feel right leaving
> it as 'because that's the way it is'. :-)

'Because that is how it has to be for technical internal reasons beyond 
the scope of my teaching.'

-- 
Terry Jan Reedy

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


Thread

Re: Why has __new__ been implemented as a static method? Terry Reedy <tjreedy@udel.edu> - 2014-05-03 16:32 -0400

csiph-web