

def at(addr):
    'Return an object at a given memory address.\n\n    The reverse of id(obj):\n\n        >>> at(id(obj)) is obj\n        True\n\n    Note that this function does not work on objects that are not tracked by\n    the GC (e.g. ints or strings).\n    '
    for o in gc.get_objects():
        if (id(o) == addr):
            return o
    return None

dataset/ETHPy150Open Exa-Networks/exabgp/lib/exabgp/dep/objgraph.py at/original