Ticket #107: unused_variable.patch

File unused_variable.patch, 1.2 KB (added by anonymous, 6 years ago)
  • C:/projects/workspace_python/PyYAML_2/lib/yaml/representer.py

     
    2626        self.default_style = default_style 
    2727        self.default_flow_style = default_flow_style 
    2828        self.represented_objects = {} 
    29         self.object_keeper = [] 
    3029        self.alias_key = None 
    3130 
    3231    def represent(self, data): 
    3332        node = self.represent_data(data) 
    3433        self.serialize(node) 
    3534        self.represented_objects = {} 
    36         self.object_keeper = [] 
    3735        self.alias_key = None 
    3836 
    3937    def get_classobj_bases(self, cls): 
     
    5452                #    raise RepresenterError("recursive objects are not allowed: %r" % data) 
    5553                return node 
    5654            #self.represented_objects[alias_key] = None 
    57             self.object_keeper.append(data) 
    5855        data_types = type(data).__mro__ 
    5956        if type(data) is types.InstanceType: 
    6057            data_types = self.get_classobj_bases(data.__class__)+list(data_types)