title: Python .__class__.__name__ works for one class and doesn't for another
body: <p>I'm sorry if I come across as incredibly stupid, I'm relatively new to python and I can not figure out what I am doing wrong here.</p>
  
  <p>I have two classes, and I try to get the class names of both with</p>
  
  <pre><code>*class*.__class__.__name__
  </code></pre>
  
  <p>Now, as I said, this works for one class, but doesn't for another.</p>
  
  <p>These are my classes:</p>
  
  <pre><code>class fb():
      val = 300
      mult = 2.0
      shsym = pygame.image.load('img/dummy2.png')
      value = 50
  class a():
      occ = 0
      shsym = pygame.image.load('img/it/a/shsym.png')
      plsym = pygame.image.load('img/it/a/plsym.png')
      value = 100
      hesyms = [pygame.image.load('img/a/hesym0',pygame.image.load('img/dummy.png'))]
      coord = [(50, 300),(30, 435),(310, 350)]
  </code></pre>
  
  <p>The variables inside probably don't really matter but as I can't figure out the problem I just included the whole thing.</p>
  
  <p>Then I define them</p>
  
  <pre><code>fob = fb()
  ita = a()
  </code></pre>
  
  <p>Then I set a variable as one of the defined classes</p>
  
  <pre><code>itemselect = fob
  </code></pre>
  
  <p>And then, finally, I try to check the class' name and look if it begins with 'f' (to see if it is part of a group of items)</p>
  
  <pre><code>if not itemselect.__class__.__name__.startswith("f"):
  </code></pre>
  
  <p>And in that line I get the error message</p>
  
  <pre><code>Traceback (most recent call last):
    File "D:\Programmieren\Cola Atsume\main.py", line 283, in &lt;module&gt;
       if not itemselect.__class__.__name__.startswith("f"):
  AttributeError: class fa has no attribute '__class__'
  </code></pre>
  
  <p>When itemselect is ita everything works just fine, but with fob it doesn't.
  I know I could do this differently, and my whole class system isn't really conventional and all but I don't really want to change it if I don't have to.</p>