Skip to content

Commit

Permalink
fix multidict repr
Browse files Browse the repository at this point in the history
  • Loading branch information
popravich committed Jun 16, 2015
1 parent 8fa1d34 commit 9bce9e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions aiohttp/_multidict.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,9 @@ cdef class _ViewBase:
def __len__(self):
return len(self._items)

def __repr__(self):
return '{}({!r})'.format(self.__class__.__name__, self._items)


cdef class _ViewBaseSet(_ViewBase):

Expand Down
3 changes: 3 additions & 0 deletions aiohttp/multidict.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,9 @@ def __init__(self, items):
def __len__(self):
return len(self._items)

def __repr__(self):
return '{0.__class__.__name__}({0._items!r})'.format(self)


class _ItemsView(_ViewBase, abc.ItemsView):

Expand Down

0 comments on commit 9bce9e5

Please sign in to comment.