how to call class name in python?
<p>self.<strong>class</strong>.<strong>name</strong> represents the name of the class, if I do </p>

<pre><code>class myClass(object):
   def showname(self):
     print 'My name is', self.__class__.__name__
</code></pre>

<p>this will give me the name of the class
but  </p>

<pre><code>    class myClass(object):
         def __init__(self):
             pass
             ...

    """now I want to call the class by using self.__class__.__name__ so 
    I dont have to type the class name in function_B()"""

    def someFunctions():
    return function_A().function_B(self.__class__.__name__)
</code></pre>

<p>then this gave me an error saying the self is not defined? any suggestion will be appreciated!</p>