Oct-12-2019, 11:42 PM
a while back, like 2 or 3 years ago, i read here that it was better to test types using the isinstance() function than using the type() function. i have been coding that way ever since. i'd like to know if this was just better coding practice or if there is an issue with the type() function. i've come upon a case where isinstance() adds complications while type() is simpler. i need to do a dictionary lookup based on the type of a variable. i want to be sure the type() function is really safe for this. is it?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.