def _id(thing):
    'Quote string if needed for it to be a valid identifier.'
    if isinstance(thing, AspObject):
        return thing
    elif isinstance(thing, bool):
        return ('"%s"' % str(thing))
    elif isinstance(thing, int):
        return str(thing)
    else:
        return ('"%s"' % str(thing))
Quote string if needed for it to be a valid identifier.
def _id(thing):
    
    if isinstance(thing, AspObject):
        return thing
    elif isinstance(thing, bool):
        return ('"%s"' % str(thing))
    elif isinstance(thing, int):
        return str(thing)
    else:
        return ('"%s"' % str(thing))