How to control the creation of an instance?
7stud
bbxx789_05ss at yahoo.com
Sun Jun 3 03:28:18 EDT 2007
More information about the Python-list mailing list
Sun Jun 3 03:28:18 EDT 2007
- Previous message (by thread): How to control the creation of an instance?
- Next message (by thread): getting rid of leading zeros in float expotential
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Jun 3, 12:50 am, Steven D'Aprano <s... at REMOVE.THIS.cybersource.com.au> wrote: > On Sat, 02 Jun 2007 23:25:49 -0700, 7stud wrote: > > Oops. This line: > > >> temp = object.__new__(Sample, args, kwds) > > > should be: > > > temp = object.__new__(cls, args, kwds) > > > although it would seem that cls is always going to be Sample, so I'm > > not sure what practical difference that makes. > > What if you are calling it from a sub-class? > > -- > Steven. cls it is!
- Previous message (by thread): How to control the creation of an instance?
- Next message (by thread): getting rid of leading zeros in float expotential
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list