class BarContainer(object):

    def __init__(self, parent, name):
        self.__parent__ = parent
self.__name__ = name

def __getitem__(self, key):
    return Bar(self, key)


class Bar(object):
    pass
Pyramid Traversal __name__ matching a view name