Can a Python class differentiate input types? -


for example in python class can have 2 different add methods can detect whether adding object integer, or object object, or object , string, etc?

yes, can use isinstance check if object of particular type.


Popular posts from this blog

debugging - Reference - What does this error mean in PHP? -

c++ - Why doesn't unordered_set provide an array access operator -