diff options
author | Raymond Hettinger <python@rcn.com> | 2013-05-17 09:28:33 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2013-05-17 09:28:33 (GMT) |
commit | b37706f306ff2b280ec3d37f43c0994af1d00a76 (patch) | |
tree | 2dc16bdcbfaaef9e82865c001ffe6b50267f93aa | |
parent | 0fe236b734883f7a3fb237c94d241ec85f210fe1 (diff) | |
download | cpython-b37706f306ff2b280ec3d37f43c0994af1d00a76.zip cpython-b37706f306ff2b280ec3d37f43c0994af1d00a76.tar.gz cpython-b37706f306ff2b280ec3d37f43c0994af1d00a76.tar.bz2 |
Remove unnecessary exception handler.
-rw-r--r-- | Lib/collections/__init__.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py index 9f55a3e..5ba29e6 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: |