On 5/12/05, Nick Coghlan <[EMAIL PROTECTED]> 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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com