01: #!/usr/bin/python
02: ## @package PySync
03:
04: class pere_list:
05: list = []
06: def __init__(self):
07: return
08: def add(self, element):
09: self.list.append(element)
10: return
11: def display(self):
12: for element in self.list:
13: print element
14:
15:
16: class enfant_list(pere_list):
17: def __init__(self):
18: pere_list.__init__(self)
19: return
20: def add(self, index):
21: pere_list.add(self, index)
22:
23: class enfant2_list(pere_list):
24: def __init__(self):
25: pere_list.__init__(self)
26: return
27: def add(self, index):
28: pere_list.add(self, index)
29:
30:
31:
32: list = enfant_list()
33: list2 = enfant2_list()
34: list.add(1)
35: list.add(2)
36:
37: list2.add(4)
38: list2.add(5)
39: print "Contenu de la liste"
40: list.display()
41: print "Contenu de la liste 2"
42: list2.display()
43:
44: