title: Getting field names reflectively with Python
body: <p>Is it possible to get the name of a field reflectively in Python (3.2)?</p>
  
  <p>See the following example:</p>
  
  <pre><code>class Something:
      def __init__(self):
          self.x = 1
  
      def validate():
          return validator.max(self.x, 10)
  </code></pre>
  
  <p><code>validator.max(self.x, 10)</code> should produce an error message containing the name of the field <code>x</code> as string (in this case <code>"x"</code>). </p>