Skip to content

Commit a619c64

Browse files
skdas20skirpichev
andcommitted
Check for a dict, like the Context constructor
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
1 parent ccb6fd2 commit a619c64

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Lib/_pydecimal.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def sin(x):
420420
for key, value in kwargs.items():
421421
if key not in _context_attributes:
422422
raise TypeError(f"'{key}' is an invalid keyword argument for this function")
423-
if key in ('flags', 'traps') and isinstance(value, list):
423+
if key in ('flags', 'traps') and not isinstance(value, dict):
424424
# Accept a list of signals, like the Context constructor.
425425
value = dict((s, int(s in value)) for s in _signals + value)
426426
setattr(ctx_manager.new_context, key, value)

0 commit comments

Comments
 (0)