[Python-Dev] How to suppress instance __dict__?
Delaney, Timothy C (Timothy)
tdelaney at avaya.com
Sun Mar 23 23:02:43 EST 2003
More information about the Python-list mailing list
Sun Mar 23 23:02:43 EST 2003
- Previous message (by thread): [Python-Dev] How to suppress instance __dict__?
- Next message (by thread): [Python-Dev] How to suppress instance __dict__?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> From: David Abrahams [mailto:dave at boost-consulting.com] > > > > I wouldn't say that. Use __init__ unless you *must* use __new__. And > > when you use __new__, still use __init__ for initialisation. > > > > And if you are going to use __new__, you are expected to be able to > > explain *why*. > > > > Pretty straightforward to me. > > Why should that be the rule? Why not the opposite? > > FWIW, if everyone used the opposite policy (__new__ unless you must > use __init__), the problem of __del__ operating on uninitialized > objects could be substantially relieved. Because most of the time we want to work with fully-constructed objects. You can't use overridden methods in a constructor - only from an initialiser. Tim Delaney
- Previous message (by thread): [Python-Dev] How to suppress instance __dict__?
- Next message (by thread): [Python-Dev] How to suppress instance __dict__?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list