티스토리 뷰

공부 (@Deprecated)

[Python] name of class

승가비 2021. 7. 24. 23:51
728x90
>>> import itertools
>>> x = itertools.count(0)
>>> type(x).__name__
'count'

https://stackoverflow.com/questions/510972/getting-the-class-name-of-an-instance?rq=1 

 

Getting the class name of an instance?

How do I find out a name of class that created an instance of an object in Python if the function I am doing this from is the base class of which the class of the instance has been derived? Was th...

stackoverflow.com

 

728x90
댓글