File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -41,22 +41,18 @@ def __reduce__(self):
4141
4242 def __or__ (self , other ):
4343 if not isinstance (other , dict ):
44- raise TypeError ( f'unsupported operand type(s) for |: \' collections. { self . __class__ . __qualname__ } \' and \' { type ( other ). __qualname__ } \' ' )
44+ return NotImplemented
4545
4646 new = defaultdict (self .default_factory , self )
4747 new .update (other )
4848 return new
4949
5050 def __ror__ (self , other ):
5151 if not isinstance (other , dict ):
52- raise TypeError ( f'unsupported operand type(s) for |: \' collections. { self . __class__ . __qualname__ } \' and \' { type ( other ). __qualname__ } \' ' )
52+ return NotImplemented
5353
5454 new = defaultdict (self .default_factory , other )
5555 new .update (self )
5656 return new
5757
58- def __ior__ (self , other ):
59- self .update (other )
60- return self
61-
6258defaultdict .__module__ = 'collections'
You can’t perform that action at this time.
0 commit comments