title: Python NameError: name 'self' is not defined Why?
body: <p><strong><em>At the top</em></strong>:</p>
  
  <pre><code>import pygame, sys
  from pygame.sprite import Sprite
  from pygame.locals import *
  pygame.init()
  </code></pre>
  
  <p><strong><em>Part not working</em></strong>:</p>
  
  <pre><code>class DetectionBox(Sprite):
      def __init__(self):
          Sprite.__init__(self)
          self.img = pygame.Surface([SCREEN_WIDTH, SCREEN_HEIGHT/4], SRCALPHA, 32).convert_alpha()
          self.pos = (0, SCREEN_HEIGHT - (SCREEN_HEIGHT/4)*3)
  DETECT_BOX = DetectionBox()
  </code></pre>
  
  <p><strong><em>Error</em></strong>:
  NameError: name 'self' is not defined</p>
  
  <p>Someone please explain why this isn't working, because I have no clue. It's working properly with every other class, so it's something about this one.</p>