          # including those.
          field_names = set([
              field.source for field in self.fields.values()
              if (field.source != '*') and ('.' not in field.source)
          ])
  
          # Note that we make sure to check `unique_together` both on the
          # base model class, but also on any parent classes.
          validators = []
          for parent_class in model_class_inheritance_tree:
 
</s> remove         field_names = set([
 </s> add         field_names = { </s> remove         unique_constraint_names -= set([None])
 </s> add         unique_constraint_names -= {None} </s> remove             unique_constraint_names |= set([
                model_field.unique_for_date,
                model_field.unique_for_month,
                model_field.unique_for_year
            ])
 </s> add             unique_constraint_names |= {model_field.unique_for_date, model_field.unique_for_month,
                                        model_field.unique_for_year} </s> remove         self.choice_strings_to_values = dict([
            (six.text_type(key), key) for key in self.choices.keys()
        ])
 </s> add         self.choice_strings_to_values = {
            six.text_type(key): key for key in self.choices.keys()
        } </s> remove         for method in set(['PUT', 'POST']) & set(view.allowed_methods):
 </s> add         for method in {'PUT', 'POST'} & set(view.allowed_methods):
        }
          # including those.
          field_names = set([
              field.source for field in self.fields.values()
              if (field.source != '*') and ('.' not in field.source)
        }
  
          # Note that we make sure to check `unique_together` both on the
          # base model class, but also on any parent classes.
          validators = []
          for parent_class in model_class_inheritance_tree:
keep keep keep keep replace keep keep keep keep keep
 Replaced all dict and set conversions from lists to dict and set literals. 
rest_framework/serializers.py