티스토리 뷰

공부

[Python] name of class

seunggabi 승가비 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

'공부' 카테고리의 다른 글

[Java] cast object by generic  (0) 2021.07.24
[Linux] clear kerberos (kdestroy)  (0) 2021.07.24
[Python] name of class  (0) 2021.07.24
[IntelliJ] default directory  (0) 2021.06.12
[Github] auto build when merge pr (push branch)  (0) 2021.06.12
Folder naming convention for projects  (0) 2021.05.31
댓글
댓글쓰기 폼