title: Python setter without argument?
body: <p>I'm using the property and setter decorators int he following way:</p>
  
  <pre><code>class PCAModel(object):
      def __init__(self):
          self.M_inv = None
  
      @property
      def M_inv(self):
          return self.__M_inv
  
      @M_inv.setter
      def set_M_inv(self):
          M = self.var * np.eye(self.W.shape[1]) + np.matmul(self.W.T, self.W)
          self.__M_inv = np.linalg.inv(M)
  </code></pre>
  
  <p>This generates an error in the <code>__init__</code> function because my setter is not taking an argument:</p>
  
  <pre><code>TypeError: M_inv() takes 1 positional argument but 2 were given
  </code></pre>
  
  <p>I don't want to set the <code>M_inv</code> with an argument, since the calculations of <code>M_inv</code> rely solely on other properties of the class object. I could put a dummy argument in the setter:</p>
  
  <pre><code>@M_inv.setter
  def set_M_inv(self, foo):
      M = self.var * np.eye(self.W.shape[1]) + np.matmul(self.W.T, self.W)
      self.__M_inv = np.linalg.inv(M)
  </code></pre>
  
  <p>but that feels dirty. Is there a better way to get around this?</p>