title: python static class with static method that uses self?
body: <p>I'm doing a database insert script in pycassa. I want to set up a public static class that defines some variables that will get used a lot by other functions later on. Heres what I have...</p>
  
  <pre><code>class ks_refs():
      pool = ConnectionPool('TweetsKS')
  
      user_name_cf = self.cf_connect('UserName')
      user_tweet_cf = self.cf_connect('UserTweet')
  
      def cf_connect(column_family):
          cf = pycassa.ColumnFamily(self.pool, column_family)
          return cf
  </code></pre>
  
  <p>I haven't even tried to run this yet because I'm sure it wont work. You can see I want this static variable 'pool' first, and then set up user_name_cf and user_tweet_cf (and some more later) using the cf_connect method which needs 'pool' to work.</p>
  
  <p>I know I could put that method outside the class, or I could have this non-static and make an instance of it, but I want to try this because this is what I really want (before I was just using globals but I think a static class holding all this is the best idea)</p>