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
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