          }
      elif isinstance(exc.detail, dict):
          # If errors may be a dict we use the standard {key: list of values}.
          # Here we ensure that all the values are *lists* of errors.
          return dict([
              (key, value if isinstance(value, list) else [value])
              for key, value in exc.detail.items()
          ])
      elif isinstance(exc.detail, list):
          # Errors raised as a list are non-field errors.
          return {
 
</s> remove         ])
 </s> add         } </s> remove         ])
 </s> add         } </s> remove     included = set((
        1,
        current - 1, current, current + 1,
        final
    ))
 </s> add     included = {1, current - 1, current, current + 1, final} </s> remove         field_names = set([
 </s> add         field_names = { </s> remove         ret = dict([
            (key, _force_text_recursive(value))
 </s> add         ret = {
            key: _force_text_recursive(value)
        return {
            key: value if isinstance(value, list) else [value]
          }
      elif isinstance(exc.detail, dict):
          # If errors may be a dict we use the standard {key: list of values}.
          # Here we ensure that all the values are *lists* of errors.
        return {
            key: value if isinstance(value, list) else [value]
        return {
            key: value if isinstance(value, list) else [value]
              for key, value in exc.detail.items()
          ])
      elif isinstance(exc.detail, list):
          # Errors raised as a list are non-field errors.
          return {
keep keep keep keep replace replace keep keep keep keep keep
 Replaced all dict and set conversions from lists to dict and set literals. 
rest_framework/serializers.py