title: In Python, how do I reference a class generically in a static way, like PHP's "self" keyword?
body: <p>PHP classes can use the keyword "self" in a static context, like this:</p>
  
  <pre><code>&lt;?php
  class Test {
    public static $myvar = 'a';
    public static function t() {
       echo self::$myvar; // Generically reference the current class.
       echo Test::$myvar; // Same thing, but not generic.
    }
  }
  ?&gt;
  </code></pre>
  
  <p>Obviously I can't use "self" in this way in Python because "self" refers not to a class but to an instance. So is there a way I can reference the current class in a static context in Python, similar to PHP's "self"?</p>
  
  <p>I guess what I'm trying to do is rather un-pythonic. Not sure though, I'm new to Python. Here is my code (using the Django framework):</p>
  
  <pre><code>class Friendship(models.Model):
    def addfriend(self, friend):
      """does some stuff"""
  
    @staticmethod # declared "staticmethod", not "classmethod"
    def user_addfriend(user, friend): # static version of above method
      userf = Friendship(user=user) # creating instance of the current class
      userf.addfriend(friend) # calls above method
  
  # later ....
  Friendship.user_addfriend(u, f) # works
  </code></pre>
  
  <p>My code works as expected. I just wanted to know: is there a keyword I could use on the first line of the static method instead of "Friendship"?</p>
  
  <p>This way if the class name changes, the static method won't have to be edited. As it stands the static method would have to be edited if the class name changes.</p>