diff options
author | Raymond Hettinger <python@rcn.com> | 2013-05-17 09:29:27 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2013-05-17 09:29:27 (GMT) |
commit | 5c71079d06685e14f39209a730c8b59519803325 (patch) | |
tree | 8ac307136e7fb82998f24c105050559837a0245b /Lib/collections/__init__.py | |
parent | 419722168b6494163fe253b03536731c42c2996b (diff) | |
parent | b37706f306ff2b280ec3d37f43c0994af1d00a76 (diff) | |
download | cpython-5c71079d06685e14f39209a730c8b59519803325.zip cpython-5c71079d06685e14f39209a730c8b59519803325.tar.gz cpython-5c71079d06685e14f39209a730c8b59519803325.tar.bz2 |
merge
Diffstat (limited to 'Lib/collections/__init__.py')
-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 9453320..ad70558 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: |