コード例 #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