gh-149534: Fix unification of defaultdict and frozendict with |#149539
gh-149534: Fix unification of defaultdict and frozendict with |#149539sobolevn wants to merge 1 commit intopython:mainfrom
defaultdict and frozendict with |#149539Conversation
| with self.assertRaises(TypeError): | ||
| i |= None | ||
|
|
||
| # frozendict |
There was a problem hiding this comment.
Can you also test what frozendict | defaultdict does?
|
@JelleZijlstra you were right, there's a big behavior difference here. >>> from collections import OrderedDict
>>> dict() | OrderedDict()
OrderedDict()
>>> frozendict() | OrderedDict()
frozendict()Since Lines 10531 to 10539 in 354ef33 While it is called for I am not sure that this is a bug, though. It works as expected,, if you know all the little details. But, it might be unexpected for people who just want to swap @vstinner, what do you think? |
|
I don't have a strong opinion on what the right behavior is, but let's make sure that OrderedDict and defaultdict behave consistently at least. |
I have a lot of free time today 😆