title: Get list of attributes in class
body: <p>How would I get  a list of attributes in a class? For example:</p>
  
  <pre><code>class Test:
      def __init__(self,**kw):
          for k,v in kw.items():
              setattr(self,k,v)
  x = Test(value="hello",valueTwo="world")
  print(dir(x))
  </code></pre>
  
  <p>I've done that and it seems to print the keys but, it also prints extra stuff like:</p>
  
  <pre><code>['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__','value','valueTwo']
  </code></pre>
  
  <p>is there another way to do this so it just gets the keys/values.</p>