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 2b622f2 commit 45c3eb8Copy full SHA for 45c3eb8
Lib/typing.py
@@ -230,15 +230,11 @@ def _remove_dups_flatten(parameters):
230
else:
231
params.append(p)
232
# Weed out strict duplicates, preserving the first of each occurrence.
233
- all_params = set(params)
234
- if len(all_params) < len(params):
235
- new_params = []
236
- for t in params:
237
- if t in all_params:
238
- new_params.append(t)
239
- all_params.remove(t)
240
- params = new_params
241
- assert not all_params, all_params
+ new_params = []
+ for p in params:
+ if p not in new_params:
+ new_params.append(p)
+ params = new_params
242
return tuple(params)
243
244
0 commit comments