Remove unneeded exception chaining.

This commit is contained in:
Raymond Hettinger 2010-09-16 08:06:05 +00:00
parent 3255c63e28
commit c1cc0d08d4
1 changed files with 1 additions and 1 deletions

View File

@ -306,7 +306,7 @@ def namedtuple(typename, field_names, verbose=False, rename=False):
try: try:
exec(template, namespace) exec(template, namespace)
except SyntaxError as e: except SyntaxError as e:
raise SyntaxError(e.msg + ':\n' + template) from e raise SyntaxError(e.msg + ':\n\n' + template)
result = namespace[typename] result = namespace[typename]
# For pickling to work, the __module__ variable needs to be set to the frame # For pickling to work, the __module__ variable needs to be set to the frame