Proposal: default __init__

Fredrik Lundh fredrik at effbot.org
Mon Nov 13 12:28:29 EST 2000


Andrew wrote:
> I propose that objects in some Python 2.x or in 3K have a
> default __init__.

agreed.  I suggest writing a draft PEP and submitting it to
python-dev (see PEP 0 for details).

> Comments?  Any reason why this would be a bad thing?

not really -- but maybe a cleaner way to call the parent class
initialization code (or any parent class method) would be even
better...

also see "Calling Base Class Methods" at:

    http://www.kuchling.com/python/writing/warts.html
    "one of the ugliest things I've ever seen in Python that
    I couldn't think of a prettier way round"

</F>





More information about the Python-list mailing list