MCPcopy Create free account
hub / github.com/ipython/ipython / OrderedCounter

Class OrderedCounter

IPython/lib/tests/test_pretty.py:454–461  ·  view source on GitHub ↗

Counter that remembers the order elements are first encountered

Source from the content-addressed store, hash-verified

452
453
454class OrderedCounter(Counter, OrderedDict):
455 'Counter that remembers the order elements are first encountered'
456
457 def __repr__(self):
458 return '%s(%r)' % (self.__class__.__name__, OrderedDict(self))
459
460 def __reduce__(self):
461 return self.__class__, (OrderedDict(self),)
462
463class MySet(set): # Override repr of a basic type
464 def __repr__(self):

Callers 1

test_custom_reprFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_custom_reprFunction · 0.68