def mkRef(ob,*args):
    """Return either a weakref or a StrongRef for 'ob'

    Note that extra args are forwarded to weakref.ref() if applicable."""

    try:
        return ref(ob,*args)
    except __HOLE__:
        return StrongRef(ob)
dataset/ETHPy150Open enthought/traits/traits/protocols/advice.py/mkRef