              return self.default()
          return self.default
  
      def __repr__(self):
          return unicode_to_repr(
              '%s(%s)' % (self.__class__.__name__, unicode_repr(self.default))
          )
  
  
  class CurrentUserDefault(object):
      def set_context(self, serializer_field):
          self.user = serializer_field.context['request'].user
 
</s> remove class CurrentUserDefault(object):
 </s> add class CurrentUserDefault: </s> remove         return unicode_to_repr('%s()' % self.__class__.__name__)
 </s> add         return '%s()' % self.__class__.__name__ </s> remove         ))
 </s> add         ) </s> remove         return unicode_to_repr('<%s(queryset=%s, fields=%s)>' % (
 </s> add         return '<%s(queryset=%s, fields=%s)>' % ( </s> remove         return unicode_to_repr('<%s(queryset=%s)>' % (
 </s> add         return '<%s(queryset=%s)>' % (
        return '%s(%s)' % (self.__class__.__name__, repr(self.default))
              return self.default()
          return self.default
  
      def __repr__(self):
        return '%s(%s)' % (self.__class__.__name__, repr(self.default))
        return '%s(%s)' % (self.__class__.__name__, repr(self.default))
        return '%s(%s)' % (self.__class__.__name__, repr(self.default))
  
  
  class CurrentUserDefault(object):
      def set_context(self, serializer_field):
          self.user = serializer_field.context['request'].user
keep keep keep keep replace replace replace keep keep keep keep keep
 Dropped Python 2 compatibility. (#6615)

Thanks to Jon Dufresne (@jdufresne) for review.

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Rizwan Mansuri <Rizwan@webbyfox.com> 
rest_framework/fields.py