Is there a way in python to get the default value for types?
//C
Am I looking for a more pythonic way to get the default settings?
#python if(isinstance(myObj, int): return 0 elif(isinstance(myObj, dict): return {} else: return None
Obviously, I lowered it. I am dealing with some abstract things, and when someone requests an attribute that I donβt have, I basically check for a key-> type mapping and return a default instance with a classic switch.
source share