def maybeName(obj):
    try:
        return obj.__name__
    except (AttributeError, ):
        return str(obj)
Returns an object's __name__ attribute or it's string representation.
dataset/ETHPy150Open blampe/IbPy/ib/lib/__init__.py/maybeName