We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b452e5c commit b863fceCopy full SHA for b863fce
tree/sequence.py
@@ -90,7 +90,11 @@ def _sequence_like(instance, args):
90
instance_type = type(instance.__wrapped__)
91
else:
92
instance_type = type(instance)
93
- return instance_type(*args)
+ try:
94
+ return instance_type(*args)
95
+ except Exception as e:
96
+ raise TypeError(
97
+ f"Couldn't traverse {instance!r} with arguments {args}") from e
98
elif isinstance(instance, ObjectProxy):
99
# For object proxies, first create the underlying type and then re-wrap it
100
# in the proxy type.
0 commit comments