title: Variables has the same value, pygame
body: <p>I'm trying to make a game in pygame, but for some reason actor and inp has the same value.
  I tried to have them as arrays instead of classes, but it didn't solve the problem.</p>
  
  <pre><code>import pygame, sys
  from pygame.locals import *
  
  pygame.init()
  screen=pygame.display.set_mode((640,360),0,32)
  
  a=pygame.image.load('a.png')
  
  class xy:
      x=0
      y=0
      jump=0
  
  actor=xy
  inp=xy
  
  def events():
      for event in pygame.event.get():
          if event.type == QUIT:
              pygame.quit()
              sys.exit()
              return
          elif event.type == KEYDOWN:
              if event.key==K_LEFT:
                  inp.x=-1
              elif event.key==K_RIGHT:
                  inp.x=1
              elif event.key==K_UP:
                  inp.y=-1
              elif event.key==K_DOWN:
                  inp.y=1
              elif event.key==K_SPACE:
                  inp.jump=True
          elif event.type==KEYUP:
              if event.key==K_LEFT:
                  inp.x=0
              elif event.key==K_RIGHT:
                  inp.x=0
              elif event.key==K_UP:
                  inp.y=0
              elif event.key==K_DOWN:
                  inp.y=0
              elif event.key==K_SPACE:
                  inp.jump=False
      return
  
  def controller():
      if inp.x&lt;0:
          actor.x-=1
      elif inp.x&gt;0:
          actor.x+=1
      if inp.y&lt;0:
          actor.y-=1
      elif inp.y&gt;0:
          actor.y+=1
  
  ##    actor.x+=inp.x
  ##    actor.y+=inp.y
      return
  
  def screen_update():
      pygame.draw.rect(screen, 0x006633, ((0,0),(640,360)),0)
      screen.blit(a, (actor.x,actor.y))
      pygame.display.update()
  
  if __name__ == '__main__':
      while True:
          events()
          print 'inp='+str(inp.x)+','+str(inp.y)
          print 'actor='+str(actor.x)+','+str(inp.y)
          controller()
          screen_update()
  </code></pre>
  
  <p>Why can't the things I make work properly? :(</p>