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 e67f467 commit 44407a5Copy full SHA for 44407a5
mypyc/codegen/literals.py
@@ -169,10 +169,8 @@ def _encode_collection_values(
169
# even though frozensets are not sorted in python, we need to sort the items here
170
# to improve the determinism of the generated C file, making it easier to compare
171
# differences in the C files generated by different versions of your code.
172
- sort_keys_to_values = {str(v) + type(v).__name__: v for v in value}
173
- items = tuple(
174
- sort_keys_to_values[sort_key] for sort_key in sorted(sort_keys_to_values)
175
- )
+ sort_helper = {str(v) + type(v).__name__: v for v in value}
+ items = tuple(sort_helper[key] for key in sorted(sort_helper))
176
else:
177
items = value
178
for item in items:
0 commit comments