def typename(x):
    """ return the most informative type name available for x
    """
    typeOfX = type(x).__name__
    if typeOfX == 'instance':
        return x.__class__.__name__
    return typeOfX
