Reinhold Birkenfeld wrote: > Shane Hathaway wrote: >> PEP 340 seems to punish people for avoiding the parentheses: >> >> transaction = begin_transaction() >> >> transaction: >> db.execute('insert 3 into mytable') >> >> transaction: >> db.execute('insert 4 into mytable') >> >> I expect that only '3' would be inserted in mytable. The second use >> of >> the transaction iterator will immediately raise StopIteration. > > Yes, but wouldn't you think that people would misunderstand it in this > way? This could be solved if the translation of block EXPR1 as VAR1: BLOCK1 would change from: itr = EXPR1 # The iterator ret = False # True if a return statement is active ...etc... to: itr = iter(EXPR1) # The iterator ret = False # True if a return statement is active ...etc... --eric -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1134 bytes Desc: not available Url : http://mail.python.org/pipermail/python-dev/attachments/20050505/bda648c0/attachment.bin
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