[Patches] [ python-Patches-580386 ] uncaught TypeError exception in sre

noreply@sourceforge.net noreply@sourceforge.net
Thu, 11 Jul 2002 20:05:41 -0700


Patches item #580386, was opened at 2002-07-11 22:11
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=580386&group_id=5470

Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Neal Norwitz (nnorwitz)
Assigned to: Fredrik Lundh (effbot)
Summary: uncaught TypeError exception in sre

Initial Comment:
>From c.l.p on 9 July, Kevin Altis reported that:

    re.compile('([a-')

Produces an uncaught TypeError from compilation.

This patch catches the TypeError in _compile().

----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2002-07-11 23:05

Message:
Logged In: YES 
user_id=33168

I wonder if the same change must be made in _compile_repl().

I don't see the benefit of the try/except clause as it is:

  try:
    p = parse...
  except error, v:
    raise error, v
Isn't that just:  p = parse...

This probably also should be backported to 2.2

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=580386&group_id=5470