From: Raymond Hettinger Date: Fri, 17 May 2013 09:28:33 +0000 (-0700) Subject: Remove unnecessary exception handler. X-Git-Tag: v3.4.0a1~705^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b37706f306ff2b280ec3d37f43c0994af1d00a76;p=thirdparty%2FPython%2Fcpython.git Remove unnecessary exception handler. --- diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py index 9f55a3e7a373..5ba29e6aba37 100644 --- a/Lib/collections/__init__.py +++ b/Lib/collections/__init__.py @@ -363,10 +363,7 @@ def namedtuple(typename, field_names, verbose=False, rename=False): # Execute the template string in a temporary namespace and support # tracing utilities by setting a value for frame.f_globals['__name__'] namespace = dict(__name__='namedtuple_%s' % typename) - try: - exec(class_definition, namespace) - except SyntaxError as e: - raise SyntaxError(e.msg + ':\n\n' + class_definition) + exec(class_definition, namespace) result = namespace[typename] result._source = class_definition if verbose: