Kaydet (Commit) c1cc0d08 authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Remove unneeded exception chaining.

üst 3255c63e
...@@ -306,7 +306,7 @@ def namedtuple(typename, field_names, verbose=False, rename=False): ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment