Python ignoring property setter in favor of property getter
<p>I have created a class that has a property with a setter. There are 2 different ways to use this class, so the values of some of the object components may be set in a different order depending on the scenario (i.e. I don't want to set them during <code>__init__</code>). I have included a non-property with its own set function here to illustrate what is and isn't working.</p>

<pre><code>class Dumbclass(object):

  def __init__(self):
    self.name = None
    self.__priority = None

  @property
  def priority(self):
    return self.__priority

  @priority.setter
  def priority(self, p):
    self.__priority = p

  def set_name(self, name):
    self.name = "dumb " + name

  def all_the_things(self, name, priority=100):
    self.set_name(name) 
    self.priority(priority)

    print self.name
    print self.priority
</code></pre>

<p>When I run the following, it returns <code>TypeError: 'NoneType' object is not callable</code>. I investigated with pdb, and found that it was calling the getter instead of the setter at <code>self.priority(priority)</code>.</p>

<pre><code>if __name__ == '__main__':
  d1 = Dumbclass()
  d1.all_the_things("class 1")

  d2 = Dumbclass()
  d2.all_the_things("class 2", 4)
</code></pre>

<p>What's going on here?</p>