Python 2.0

Barry A. Warsaw bwarsaw at cnri.reston.va.us
Thu Jun 3 21:48:48 CEST 1999


>>>>> "Hrvoje" == Hrvoje Niksic <hniksic at srce.hr> writes:

    Hrvoje> Would this right approach ever work in Python?  Given
    Hrvoje> Python's dynamism, it's perfectly legal to write:

    Hrvoje>     x.__del__ = FN

    Hrvoje> where x is an instance of a class without a __del__()
    Hrvoje> method.  But then again, maybe it would be OK to silently
    Hrvoje> ignore such __del__ methods...

Yep, that's exactly what would be broken with my approach.

-Barry




More information about the Python-list mailing list