[Patches] [ python-Patches-500002 ] Fix for #221791 (bad \x escape)
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 01 Mar 2002 15:00:39 -0800
Patches item #500002, was opened at 2002-01-05 19:45
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=500002&group_id=5470
Category: Core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Martin v. Löwis (loewis)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix for #221791 (bad \x escape)
Initial Comment:
This patch adds file and line output if a bad \x escape
was found in the source. It does so with the following
modifications:
- PyErr_Display now recognizes syntax errors not by
their class, but by an attribute print_file_and_line
- this attribute is set for all SyntaxError instances
- PyErr_SyntaxLocation is enhanced to set all attributes
expected for a syntax error, even if the current
exception has a different class.
- compile.c now invokes PyErr_SyntaxLocation for all
non-syntax exceptions also, mostly through com_error.
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2002-03-01 18:00
Message:
Logged In: YES
user_id=6380
If the pydebug problem can be fixed, I'd be all for
implementing it, and adding to 2.2.1.
----------------------------------------------------------------------
Comment By: Michael Hudson (mwh)
Date: 2002-01-30 10:01
Message:
Logged In: YES
user_id=6656
This doesn't compile --with-pydebug (he suddenly notices).
There's an assert(val == NULL) in compile.c, but no variable
val.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=500002&group_id=5470