Skip to content

Commit c7dc51b

Browse files
More compact state.
1 parent e9b6872 commit c7dc51b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/_weakrefset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def __reduce__(self):
8585
dict, slots = self.__getstate__()
8686
for name in WeakSet.__slots__:
8787
slots.pop(name, None)
88-
state = (dict, slots) if dict or slots else None
88+
state = (dict, slots) if slots else (dict or None)
8989
return self.__class__, (list(self),), state
9090

9191
def add(self, item):

0 commit comments

Comments
 (0)