Re: [Python-Dev] PEP 340: Examples as class's.

2005-05-06 Thread Ron Adam
Ron Adam wrote: A minor correction to the Block class due to re-editing. > def __call__(self, *args): > self.block(*args) > self.__del__() This should have been. def __call__(self, *args): try: self.block(*args) except Exception, self.__e

[Python-Dev] PEP 340: Examples as class's.

2005-05-05 Thread Ron Adam
Eric Nieuwland wrote: > Ron Adam wrote: > >> Eric Nieuwland wrote: >> >>> This is linear. No looping whatsoever. And easily translated to a >>> simple language construct and a protocol: >>> >>> class resource(object): >>> def __init__(self,...): >>> # store resource paramete