Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #70907
| From | Gregory Ewing <greg.ewing@canterbury.ac.nz> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Why has __new__ been implemented as a static method? |
| Date | 2014-05-04 20:03 +1200 |
| Message-ID | <bsmaioFkse2U1@mid.individual.net> (permalink) |
| References | <mailman.9665.1399113463.18130.python-list@python.org> <53650751$0$29965$c3e8da3$5496439d@news.astraweb.com> <bslc0jFf9idU1@mid.individual.net> <5365b5f1$0$29965$c3e8da3$5496439d@news.astraweb.com> |
Steven D'Aprano wrote: > If it were a class method, you would call it by MyBaseClass.__new__() > rather than explicitly providing the cls argument. But that wouldn't be any good, because the base __new__ needs to receive the actual class being instantiated, not the class that the __new__ method belongs to. -- Greg
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Why has __new__ been implemented as a static method? Jurko Gospodnetić <jurko.gospodnetic@pke.hr> - 2014-05-03 12:37 +0200
Re: Why has __new__ been implemented as a static method? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-03 15:12 +0000
Re: Why has __new__ been implemented as a static method? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-05-04 11:21 +1200
Re: Why has __new__ been implemented as a static method? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-04 03:37 +0000
Re: Why has __new__ been implemented as a static method? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-05-04 20:03 +1200
Re: Why has __new__ been implemented as a static method? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-04 14:16 +0000
Re: Why has __new__ been implemented as a static method? Rotwang <sg552@hotmail.co.uk> - 2014-05-04 17:24 +0100
Re: Why has __new__ been implemented as a static method? Ian Kelly <ian.g.kelly@gmail.com> - 2014-05-04 11:05 -0600
csiph-web