mirror of
https://github.com/python/cpython.git
synced 2025-08-18 15:51:23 +00:00
caught is the right pp of catch; thanks to Don Bennett from docs@
This commit is contained in:
parent
187aa269c2
commit
f45501d8f8
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ with con:
|
||||||
con.execute("insert into person(firstname) values (?)", ("Joe",))
|
con.execute("insert into person(firstname) values (?)", ("Joe",))
|
||||||
|
|
||||||
# con.rollback() is called after the with block finishes with an exception, the
|
# con.rollback() is called after the with block finishes with an exception, the
|
||||||
# exception is still raised and must be catched
|
# exception is still raised and must be caught
|
||||||
try:
|
try:
|
||||||
with con:
|
with con:
|
||||||
con.execute("insert into person(firstname) values (?)", ("Joe",))
|
con.execute("insert into person(firstname) values (?)", ("Joe",))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue