title: 'Bullet' object has no attribute '_Sprite__g' when adding Sprite to Group
body: <p>I wrote a simple game in Python and I got an  error.</p>
  
  <pre><code>import pygame
  import random
  BLACK = (   0,   0,   0)
  WHITE = ( 255, 255, 255)
  RED   = ( 255,   0,   0)
  BLUE  = (   0,   0, 255)
  class Block(pygame.sprite.Sprite):
      def __init__(self, color):
          super().__init__()
          self.image = pygame.Surface([20, 15])
          self.image.fill(color)
          self.rect = self.image.get_rect()
  class Player(pygame.sprite.Sprite):
      def __init__(self):
          super().__init__()
          self.image = pygame.Surface([15, 20])
          self.image.fill(RED)
          self.rect = self.image.get_rect()
      def update(self):
          pos = pygame.mouse.get_pos()
          self.rect.x = pos[0]
  class Bullet(pygame.sprite.Sprite):
      def __init__(self):
          self.image = pygame.Surface([4, 10])
          self.image.fill(BLACK)
          self.rect = self.image.get_rect()
      def update(self):
          self.rect.y -= 3
  pygame.init()
  screen_size = [700,500]
  screen = pygame.display.set_mode(screen_size)
  pygame.display.set_caption("Shooting things - Vers 2.0 of Blocks")
  all_sprites_list = pygame.sprite.Group()
  blocks_list = pygame.sprite.Group()
  bullets_list = pygame.sprite.Group()
  for i in range(50):
      block = Block(BLUE)
      block.rect.x = random.randrange( 660)
      block.rect.y = random.randrange( 480)
  
      blocks_list.add(block)
      all_sprites_list.add(block)
  player = Player()
  all_sprites_list.add(player)
  score = 0
  player.rect.y = 670
  done = False
  clock = pygame.time.Clock()
  while not done:
      for event in pygame.event.get():
          if event.type == pygame.QUIT:
              done = True
          if event.type == pygame.MOUSEBUTTONDOWN:
              bullet = Bullet()
              bullet.rect.x = player.rect.x
              bullet.rect.y = player.rect.y
              all_sprites_list.add(bullet)
              bullets_list.add(bullet)
      all_sprites_list.update()
  
      for bullet in bullets_list:
          block_hit_list = pygame.sprite.spritecollide(bullet, blocks_list, True)
  
          for block in block_hit_list:
              bullets_list.remove(bullet)
              all_sprites_list.remove(bullet)
              score += 1
              print(score)
          if bullet.rect.y &lt;-10:
              bullets_list.remove(bullet)
              all_sprites_list.remove(bullet)
      screen.fill(WHITE)
      all_sprites_list.draw(screen)
      pygame.display.update()
      clock.tick(60)
  pygame.quit()
  </code></pre>
  
  <p>Here's the error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Documents and Settings\KHAI NHANH PC\Desktop\My Stuff\Python\Shooting things.py", line 57, in &lt;module&gt;
      all_sprites_list.add(bullet)
    File "C:\Python34\lib\site-packages\pygame\sprite.py", line 360, in add
      sprite.add_internal(self)
    File "C:\Python34\lib\site-packages\pygame\sprite.py", line 163, in add_internal
      self.__g[group] = 0
  AttributeError: 'Bullet' object has no attribute '_Sprite__g'
  </code></pre>
  
  <p>I checked line 57 and I still don't know what went wrong.
  Line 57: </p>
  
  <blockquote>
  <pre><code>all_sprites_list.add(bullet)
  </code></pre>
  </blockquote>