示例#1
0
        class Test(object):
            nexts = ManyMap('prevs')
            prevs = ManyMap('nexts')

            def __init__(self, name):
                self.name = name

            def __repr__(self):
                return self.name
示例#2
0
        class TestBuilder(object):
            nexts = ManyMap('prevs')
            prevs = ManyMap('nexts')

            def __init__(self, name, iterable=()):
                self.name = name
                self.items = list(iterable)

            def extend(self, *items):
                self.items.extend(items)

            def __str__(self):
                return self.name
示例#3
0
        class Test(object):
            others = ManyMap('others')

            def __init__(self, name):
                self.name = name

            def __str__(self):
                return self.name
示例#4
0
        class TestBuilder(object):
            nexts = ManyMap()

            def __init__(self, name, iterable=()):
                self.name = name
                self.items = list(iterable)

            def extend(self, *items):
                self.items.extend(items)
示例#5
0
        class TestMany(object):
            nexts = ManyMap(on_link=on_link, on_unlink=on_unlink)

            def __init__(self, name):
                self.name = name
示例#6
0
        class TestMany(object):
            nexts = ManyMap()

            def __init__(self, name):
                self.name = name
示例#7
0
        class TestMany(object):
            nexts = ManyMap(cyclic=False)

            def __init__(self, name):
                self.name = name
示例#8
0
        class TestMany(object):
            nexts = ManyMap('prevs')
            prevs = ManyMap('nexts')

            def __init__(self, name):
                self.name = name
示例#9
0
        class TestMany(object):
            nexts = ManyMap('prevs', on_link=on_link, on_unlink=on_unlink)
            prevs = ManyMap('nexts')

            def __init__(self, name):
                self.name = name
示例#10
0
 class Test(object):
     nexts = ManyMap()
示例#11
0
        class TestOneMany(object):
            parent = One('children')
            children = ManyMap('parent')

            def __init__(self, name):
                self.name = name