The Python Oracle

Getting the class name of an instance

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Game Looping

--

Chapters
00:00 Question
00:25 Accepted answer (Score 2443)
01:04 Answer 2 (Score 513)
01:17 Answer 3 (Score 165)
01:31 Answer 4 (Score 51)
02:27 Thank you

--

Full question
https://stackoverflow.com/questions/5109...

Question links:
[inspect]: https://docs.python.org/2/library/inspec...

Accepted answer links:
[__name__]: https://docs.python.org/library/stdtypes...
[new-style classes]: https://wiki.python.org/moin/NewClassVsC...

Answer 3 links:
[type()]: https://docs.python.org/3/library/functi...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #introspection #instanceof #pythondatamodel

#avk47