[ python-Bugs-1569998 ] 2.5 incorrectly permits break inside try statement
SourceForge.net
noreply at sourceforge.net
Wed Oct 4 16:33:41 CEST 2006
Bugs item #1569998, was opened at 2006-10-03 14:04
Message generated for change (Comment added) made by jhylton
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1569998&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parser/Compiler
Group: Python 2.5
>Status: Closed
>Resolution: Fixed
Priority: 8
Submitted By: Nick Coghlan (ncoghlan)
>Assigned to: Jeremy Hylton (jhylton)
Summary: 2.5 incorrectly permits break inside try statement
Initial Comment:
The new AST compiler permits the break statement inside
*any* frame block, rather than requiring that there be
a loop somewhere on the block stack.
Will add examples in a comment where SF shouldn't
destroy the formatting.
----------------------------------------------------------------------
>Comment By: Jeremy Hylton (jhylton)
Date: 2006-10-04 14:33
Message:
Logged In: YES
user_id=31392
Fixed on the trunk by r52129.
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2006-10-04 05:47
Message:
Logged In: YES
user_id=33168
Jeremy checked in r52129 on head. Needs backport to 2.5.
----------------------------------------------------------------------
Comment By: Nick Coghlan (ncoghlan)
Date: 2006-10-03 14:05
Message:
Logged In: YES
user_id=1038590
Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more
information.
>>> try:
... print 1
... break
... print 2
... finally:
... print 3
...
SyntaxError: 'break' outside loop
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32
bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more
information.>>> try:
... print 1
... break
... print 2
... finally:
... print 3
...
1
3
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1569998&group_id=5470
More information about the Python-bugs-list
mailing list