def IntSerializer(theint):
    return str(theint)

def StringSerializer(thestring):
    return repr(thestring)

def MyOwnSerializer(value):
    return 'whatever'
Determine if Python variable is an instance of a built-in type