Re: [Python-Dev] Re: __except__ use cases

2005-04-24 Thread holger krekel
Hi Nick, On Sun, Apr 24, 2005 at 12:40 +1000, Nick Coghlan wrote: > Seeing this example has convinced me of something. PEP 310 should use the > 'with' keyword, and 'expression block' syntax should be used to denote the > 'default object' semantics proposed for Python 3K. For example: While tha

Re: [Python-Dev] Re: __except__ use cases

2005-04-24 Thread John J Lee
On Sun, 24 Apr 2005, Nick Coghlan wrote: [...] > Seeing this example has convinced me of something. PEP 310 should use the > 'with' > keyword, and 'expression block' syntax should be used to denote the 'default > object' semantics proposed for Python 3K. For example: > > class Key2AttributeErro

[Python-Dev] Re: __except__ use cases

2005-04-23 Thread Nick Coghlan
holger krekel wrote: On a side note, I don't see too much point in having __except__ return something when it is otherwise easy to say: def __except__(self, typ, val, tb): self.abort_transaction() raise typ, val, tb It has to do with "Errors should never pass silently, unl