Skip to content

Commit 0dffc46

Browse files
committed
ReturnDict and ReturnList repr as standard dict/list. Closes #2421.
1 parent da1db34 commit 0dffc46

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

rest_framework/utils/serializer_helpers.py

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ def __init__(self, *args, **kwargs):
1616
def copy(self):
1717
return ReturnDict(self, serializer=self.serializer)
1818

19+
def __repr__(self):
20+
return dict.__repr__(self)
21+
1922

2023
class ReturnList(list):
2124
"""
@@ -27,6 +30,9 @@ def __init__(self, *args, **kwargs):
2730
self.serializer = kwargs.pop('serializer')
2831
super(ReturnList, self).__init__(*args, **kwargs)
2932

33+
def __repr__(self):
34+
return list.__repr__(self)
35+
3036

3137
class BoundField(object):
3238
"""

0 commit comments

Comments
 (0)