title: @staticmethod with @property
body: <p>I want</p>
  
  <pre><code>Stats.singleton.twitter_count += 1
  </code></pre>
  
  <p>and I thought I could do</p>
  
  <pre><code>class Stats:
      singleton_object = None
  
      @property
      @staticmethod
      def singleton():
          if Stats.singleton_object:
              return Stats.singleton_object
          Stats.singleton_object = Stats()
          return Stats.singleton()
  </code></pre>
  
  <p>But it throws an exception:</p>
  
  <pre><code>&gt;&gt;&gt; Stats.singleton.a = "b"
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  TypeError: 'property' object has only read-only attributes (assign to .a)
  </code></pre>