'Get the latest version of an object.
This can handle just about anything callable; instances, functions,
methods, and classes.'

def latestVersionOf(self, anObject):

    t = type(anObject)
    if (t == types.FunctionType):
        return latestFunction(anObject)
    elif (t == types.MethodType):
        if (anObject.im_self is None):
            return getattr(anObject.im_class, anObject.__name__)
        else:
            return getattr(anObject.im_self, anObject.__name__)
    elif (t == types.InstanceType):
        getattr(anObject, 'nothing', None)
        return anObject
    elif (t == types.ClassType):
        return latestClass(anObject)
    else:
        log.msg('warning    returning    anObject!')
        return anObject
