testing value type - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: General (https://python-forum.io/forum-1.html) +--- Forum: News and Discussions (https://python-forum.io/forum-31.html) +--- Thread: testing value type (/thread-32141.html) |
testing value type - Skaperen - Jan-23-2021 what is the reason we should do isinstance(foo,str) instead of type(foo) is str or type(foo) == str ?
RE: testing value type - snippsat - Jan-23-2021 This sum it up fine. type() vs. isinstance() Quote:Conclusions |