How can I get the name of the python class?
When I have a foo object, I can get the class object via
str(foo.__class__)
However, I only need the class name (eg "Foo"), the above would give me something like strings
"<class 'my.package.Foo'>"
I know I can get this pretty easily with a regex, but I would like to know if there is a "cleaner" way.
+1
a source to share