A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2005-June/054059.html below:

[Python-Dev] PEP 343 rewrite complete

[Python-Dev] PEP 343 rewrite complete [Python-Dev] PEP 343 rewrite completeArnold deVos adv at langdale.com.au
Thu Jun 2 15:47:57 CEST 2005
Guido van Rossum wrote:
> [Phillip J. Eby]
>>* The transaction handler could also be written as:
>>
>>     @with_template
>>     def transactional(db):
>>         db.begin()
>>         try:
>>             yield db
>>         except:
>>             db.rollback()
>>         else:
>>             db.commit()
>>
>>at least, if I understand it correctly.
> 
> 
> Ah, of course. I've updated the PEP.
> 

This template eats eats the exception, which will cause a RuntimeError
in the proposed Wrapper, I think.  A raise after rollback is needed.

- Arnold

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4