Remove unneeded exception chaining.
This commit is contained in:
parent
3255c63e28
commit
c1cc0d08d4
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue