title: Get public properties from a class
body: <p>I would like to get all of the public properties of an instance of a class in Python 3, in a dictionary, with a function <code>public</code>, without the help of a function in the class. For example, for an instance of the following class :</p>
  
  <pre><code>class Test:
      def __init__(self):
          self.a = 5
          self.__b = 2
  
      @property
      def c(self):
          return 9
  
      def d(self):
          return 2
      def __e(self):
          return 2
  </code></pre>
  
  <p>I would like the following dict :</p>
  
  <pre><code>{'a': 5, 'c': 9}
  </code></pre>
  
  <p>Thanks in advance for your responses.</p>