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 1d89a60 commit eba13f5Copy full SHA for eba13f5
unpythonic/collections.py
@@ -117,6 +117,8 @@ def doit(x):
117
return ctor(doit(elt) for elt in x)
118
elif isinstance(x, Set):
119
# dict_items cannot be instantiated, so return a regular set if we're asked to mogrify one
120
+ # TODO: is it possible to get the owner dict and mogrify it instead?
121
+ # (this case usually turns up in "with curry" with somedict.items())
122
ctor = type(x) if not isinstance(x, _dictitems_type) else set
123
return ctor({doit(elt) for elt in x})
124
return func(x) # atom
0 commit comments