del
Rene Pijlman
reageer.in at de.nieuwsgroep
Sat Feb 15 07:08:36 EST 2003
Daniel Silva:
>Jp Calderone <exarkun at intarweb.us> wrote:
>> >>> class Foo:
>> ... def __init__(self): self.bar = 10
>> ...
>> >>> f = Foo()
>> >>> del f.bar
>> >>> f.bar # AttributeError
>
>Why would you do that? You just broke your class's contract.
Python supports contracts that can be broken, re-negotiated and
renewed at runtime :-)
--
René Pijlman
Wat wil jij leren? http://www.leren.nl
More information about the Python-list
mailing list