This is an implementation of inspect.getmembers, as in some versions
    of python it may be buggy.
    See issue at http://bugs.python.org/issue1785

def getmembers(_object, _predicate):
    """This is an implementation of inspect.getmembers, as in some versions
    of python it may be buggy.
    See issue at http://bugs.python.org/issue1785"""
    # This should be:
    #return inspect.getmembers(_object, _predicate)

    # ... and it is re-implemented as:
    observers = []
    for key in dir(_object):
        try: m = getattr(_object, key)
        except AttributeError: continue
        if _predicate(m): observers.append((key, m))
        pass
    return observers