<p>What method do I call to get the name of a class?</p>

[{'answer_id': 75456, 'author': 'clahey', 'author_id': 8453, 'author_profile': 'https://Stackoverflow.com/users/8453', 'pm_score': 5, 'selected': False, 'text': "<p>It's not a method, it's a field.  The field is called <code>__name__</code>.  <code>class.__name__</code> will give the name of the class as a string.  <code>object.__class__.__name__</code> will give the name of the class of an object.</p>\n"}, {'answer_id': 75467, 'author': 'Mr Shark', 'author_id': 6093, 'author_profile': 'https://Stackoverflow.com/users/6093', 'pm_score': 7, 'selected': True, 'text': "<pre><code>In [1]: class Test:\n   ...:     pass\n   ...: \n\nIn [2]: Test.__name__\nOut[2]: 'Test'\n</code></pre>\n"}, {'answer_id': 77222, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': '<p>In [8]: <code>str(\'2\'.__class__)</code><br />\nOut[8]: <code>"&lt;type \'str\'&gt;"</code><br /></p>\n\n<p>In [9]: <code>str(len.__class__)</code><br />\nOut[9]: <code>"&lt;type \'builtin_function_or_method\'&gt;"</code><br /></p>\n\n<p>In [10]: <code>str(4.6.__class__)</code><br />\nOut[10]: <code>"&lt;type \'float\'&gt;"</code><br /></p>\n\n<p>Or, as was pointed out before,<br /></p>\n\n<p>In [11]: <code>4.6.__class__.__name__</code><br />\nOut[11]: <code>\'float\'</code></p>\n'}, {'answer_id': 83155, 'author': 'Jon Cage', 'author_id': 15369, 'author_profile': 'https://Stackoverflow.com/users/15369', 'pm_score': 4, 'selected': False, 'text': '<p>I agree with Mr.Shark, but if you have an instance of a class, you\'ll need to use its <code>__class__</code> member:</p>\n\n<pre><code>&gt;&gt;&gt; class test():\n...     pass\n...\n&gt;&gt;&gt; a_test = test()\n&gt;&gt;&gt;\n&gt;&gt;&gt; a_test.__name__\nTraceback (most recent call last):\n  File "&lt;stdin&gt;", line 1, in &lt;module&gt;\nAttributeError: test instance has no attribute \'__name__\'\n&gt;&gt;&gt;\n&gt;&gt;&gt; a_test.__class__\n&lt;class __main__.test at 0x009EEDE0&gt;\n</code></pre>\n'}, {'answer_id': 53653620, 'author': 'Azat Ibrakov', 'author_id': 5997596, 'author_profile': 'https://Stackoverflow.com/users/5997596', 'pm_score': 2, 'selected': False, 'text': '<p>From <a href="https://docs.python.org/whatsnew/3.3.html#pep-3155-qualified-name-for-classes-and-functions" rel="nofollow noreferrer"><strong>Python 3.3</strong></a> and onwards we can use <a href="https://docs.python.org/library/stdtypes.html#definition.__qualname__" rel="nofollow noreferrer"><code>__qualname__</code> field</a> for both classes &amp; functions.</p>\n<p>It differs from <a href="https://docs.python.org/library/stdtypes.html#definition.__name__" rel="nofollow noreferrer"><code>__name__</code> field</a> for nested objects like class defined in other class</p>\n<pre><code>&gt;&gt;&gt; class A:\n        class B:\n            pass\n&gt;&gt;&gt; A.B.__name__\n\'B\'\n&gt;&gt;&gt; A.B.__qualname__\n\'A.B\'\n</code></pre>\n<p>which may be quite useful.</p>\n<h1>Further reading</h1>\n<ul>\n<li><a href="https://www.python.org/dev/peps/pep-3155/" rel="nofollow noreferrer">PEP 3155 -- Qualified name for classes and functions</a>.</li>\n</ul>\n'}]
['https://Stackoverflow.com/questions/75440', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8453/']