Python collections.OrderedDict.__repr__() Examples
The following are 7
code examples of collections.OrderedDict.__repr__().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
collections.OrderedDict
, or try the search function
.
Example #1
Source File: get_inventory.py From python-zhmcclient with Apache License 2.0 | 5 votes |
def pprint_for_ordereddict(): """ Context manager that causes pprint() to print OrderedDict objects as nicely as standard Python dictionary objects. """ od_saved = OrderedDict.__repr__ try: OrderedDict.__repr__ = dict.__repr__ yield finally: OrderedDict.__repr__ = od_saved
Example #2
Source File: defaultOrderedDict.py From Comparative-Annotation-Toolkit with Apache License 2.0 | 5 votes |
def __repr__(self): return 'OrderedDefaultDict(%s, %s)' % (self.default_factory, OrderedDict.__repr__(self))
Example #3
Source File: ordereddict.py From mappyfile with MIT License | 5 votes |
def __repr__(self): return 'DefaultOrderedDict(%s, %s)' % (self.default_factory, OrderedDict.__repr__(self))
Example #4
Source File: utils.py From ssbio with MIT License | 5 votes |
def __repr__(self): return 'OrderedDefaultDict(%s, %s)' % (self.default_factory, OrderedDict.__repr__(self))
Example #5
Source File: test.py From hwrt with MIT License | 5 votes |
def __repr__(self): return "OrderedDefaultDict({}, {})".format( self.default_factory, OrderedDict.__repr__(self), )
Example #6
Source File: utils.py From graphqllib with MIT License | 5 votes |
def __repr__(self, _repr_running=None): if _repr_running is None: _repr_running = {} return 'OrderedDefaultDict(%s, %s)' % (self.default_factory, OrderedDict.__repr__(self, _repr_running))
Example #7
Source File: default_ordered_dict.py From graphql-core-legacy with MIT License | 5 votes |
def __repr__(self): return "DefaultOrderedDict({}, {})".format( self.default_factory, OrderedDict.__repr__(self)[19:-1] )