mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Allow 'continue' inside 'try' clause
SF patch 102989 by Thomas Wouters
This commit is contained in:
parent
1bbc048310
commit
3faa52ecc4
9 changed files with 74 additions and 45 deletions
|
@ -104,28 +104,11 @@ def ckmsg(src, msg):
|
|||
s = '''\
|
||||
while 1:
|
||||
try:
|
||||
continue
|
||||
except:
|
||||
pass
|
||||
'''
|
||||
ckmsg(s, "'continue' not supported inside 'try' clause")
|
||||
s = '''\
|
||||
while 1:
|
||||
try:
|
||||
continue
|
||||
finally:
|
||||
pass
|
||||
continue
|
||||
'''
|
||||
ckmsg(s, "'continue' not supported inside 'try' clause")
|
||||
s = '''\
|
||||
while 1:
|
||||
try:
|
||||
if 1:
|
||||
continue
|
||||
finally:
|
||||
pass
|
||||
'''
|
||||
ckmsg(s, "'continue' not supported inside 'try' clause")
|
||||
ckmsg(s, "'continue' not supported inside 'finally' clause")
|
||||
s = '''\
|
||||
try:
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue