Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@recursive_repr
def __repr__(self):
"""Return string representation of SortedListWithKey."""
temp = '{0}({1}, key={2}, load={3})'
return temp.format(
self.__class__.__name__,
repr(list(self)),
repr(self._key),
repr(self._load)
)
@recursive_repr()
def __repr__(self):
"""Return string representation of sorted dict.
``sd.__repr__()`` <==> ``repr(sd)``
:return: string representation
"""
_key = self._key
type_name = type(self).__name__
key_arg = '' if _key is None else '{0!r}, '.format(_key)
item_format = '{0!r}: {1!r}'.format
items = ', '.join(item_format(key, self[key]) for key in self._list)
return '{0}({1}{{{2}}})'.format(type_name, key_arg, items)
@recursive_repr()
def __repr__(self):
"Text representation of mapping."
return '%s(%r)' % (self.__class__.__name__, list(self.items()))
@recursive_repr()
def __repr__(self):
temp = '{0}({1}, {{{2}}})'
items = ', '.join('{0}: {1}'.format(repr(key), repr(self[key]))
for key in self._list)
return temp.format(
self.__class__.__name__,
repr(self._func),
items
)
@recursive_repr()
def __repr__(self):
"""Return string representation of sorted set.
``ss.__repr__()`` <==> ``repr(ss)``
:return: string representation
"""
_key = self._key
key = '' if _key is None else ', key={0!r}'.format(_key)
type_name = type(self).__name__
return '{0}({1!r}{2})'.format(type_name, list(self), key)
@recursive_repr
def __repr__(self):
"""Return string representation of SortedListWithKey."""
temp = '{0}({1}, key={2}, load={3})'
return temp.format(
self.__class__.__name__,
repr(self.as_list()),
repr(self._key),
repr(self._load)
)