title: Python: What is the difference between calling a method with () and without?
body: <p>It must be something very basic and obvious, because I just can't find the answer through google or on here...</p>
  
  <p>What difference do the parentheses make in Python when I call methods?</p>
  
  <p>Example code with pygame and parentheses:</p>
  
  <pre><code>import pygame
  import sys
  
  pygame.init()
  
  screen = pygame.display.set_mode((640, 480))
  
  running = True
  
  while running:
      for event in pygame.event.get():
          if event.type == pygame.QUIT:
              pygame.quit()
              sys.exit()
  
      pygame.display.update()
  </code></pre>
  
  <p>When I click the cross of the window, it closes with sys.exit() being the last thing called in the Traceback.</p>
  
  <p>When I change it to this:</p>
  
  <pre><code>import pygame
  import sys
  
  pygame.init()
  
  screen = pygame.display.set_mode((640, 480))
  
  running = True
  
  while running:
      for event in pygame.event.get():
          if event.type == pygame.QUIT:
              pygame.quit()
              sys.exit
  
      pygame.display.update()
  </code></pre>
  
  <p>It still quits but with a display error as last item in the Traceback.</p>
  
  <p>I came across this when I followed this tutorial for Panda3D here:
  <a href="http://www.mygamefast.com/volume1/" rel="nofollow">http://www.mygamefast.com/volume1/</a></p>
  
  <p>In several of the issues (e.g. here in the "keyboardSetup" method of the "ArcadeFlightGame" class: <a href="http://www.mygamefast.com/volume1/issue5/4/" rel="nofollow">http://www.mygamefast.com/volume1/issue5/4/</a>) he calls "sys.exit" instead of "sys.exit()" and the game terminates correctly. If I change it to "sys.exit()" it causes some error when starting.</p>
  
  <p>This seems to be so very basic that nobody really explained it anywhere... I would really appreciate it if somebody could enlighten me a little on this :/</p>