def get_public_data_members(klass):
    """
    Return a list of names of members of 'klass' (a class or instance) which
    appear to be public data, not methods or private.
    """
    all_attrs = dir(klass)
    public_attrs = [a for a in all_attrs if not a.startswith('_')]
    public_data = [a for a in public_attrs if not callable(getattr(klass, a))]
    return public_data