# 以字符串的模式获取对象类的名称:>>> class MyClass: pass
>>> obj = MyClass()
>>> obj.__class__.__name__
'MyClass'
# Functions have a
# similar feature:
>>> def myfunc(): pass
>>> myfunc.__name__
'myfunc'
# 以字符串的模式获取对象类的名称:>>> class MyClass: pass
>>> obj = MyClass()
>>> obj.__class__.__name__
'MyClass'
# Functions have a
# similar feature:
>>> def myfunc(): pass
>>> myfunc.__name__
'myfunc'