On 5/12/05, Nick Coghlan <ncoghlan at gmail.com> wrote: > Yeah, I figured out a tidier way to handle it after reading Phillip's message > earlier today. My idea is similar to your second solution, but with an early > exit via break, continue or return still indicated to the __exit__() method via > TerminateBlock so that examples like transaction() continue to do the right thing: Do they? I don't write enough transactional code, but I would have thought that break, continue or return would have been a normal, expected exit from the do-statement and therefore should do a db.commit(), not a db.rollback(). Do you think you could add an example of how the transaction do-statement would be used in such a way that these would be the desired semantics? Thanks, STeVe -- You can wordify anything if you just verb it. --- Bucky Katt, Get Fuzzy
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