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


Groups > comp.lang.python > #70900 > unrolled thread

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

Started byTerry Reedy <tjreedy@udel.edu>
First post2014-05-03 16:32 -0400
Last post2014-05-03 16:32 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

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

FromTerry Reedy <tjreedy@udel.edu>
Date2014-05-03 16:32 -0400
SubjectRe: Why has __new__ been implemented as a static method?
Message-ID<mailman.9668.1399149214.18130.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web