title: Why does one property work and the other not?
body: <p>It happens that I have two property implementations. but one works and the other does not. That is, that in one it does not even enter the setters.</p>
  
  <p>I gave myself the task of wandering online, and this happens to me is very rare, both are supposed to work.</p>
  
  <p>Do you know why this happens?</p>
  
  <p>Thank you   </p>
  
  <pre><code>class QuickTasks():
  
      def __init__(self, name=None, value=None):
          self.name = name
          self.value = value
  
      @property
      def name(self):
          return self._name
  
      @name.setter
      def name(self, value):
          if isinstance(value, str):
              self._name = value
          else:
              raise TypeError("name must be str")
  
      @property
      def value(self):
          return self._value
  
      @value.setter
      def value(self, value):
          if isinstance(value, int):
              self._value = value
          else:
              raise TypeError("value must be int")
  
  obj = QuickTasks(name=4, value='j')
  print(obj.name)
  obj.name = 5
  print(obj.name)
  
  ################################################################
  
  class TreeNode(object):
      def __init__(self, value = None):
          self.value = value
          self._left_node = None
          self._right_node = None
  
      @property
      def value(self):
          return self._value
  
      @value.setter
      def value(self, value):
          if isinstance(value, int):
              self._value = 8
          else:
              raise TypeError("value must be int")
  
  def main():
      tree_node = TreeNode(3)
      #tree_node.value = 3
      print (tree_node.value)
  
  if __name__ == '__main__':
      print("")
      main()
  </code></pre>