Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tutorius/properties.py
diff options
context:
space:
mode:
Diffstat (limited to 'tutorius/properties.py')
-rw-r--r--tutorius/properties.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tutorius/properties.py b/tutorius/properties.py
index 62a7605..55b02ca 100644
--- a/tutorius/properties.py
+++ b/tutorius/properties.py
@@ -204,8 +204,12 @@ class TArrayProperty(TutoriusProperty):
self.type = "array"
self.max_size_limit = MaxSizeConstraint(max_size_limit)
self.min_size_limit = MinSizeConstraint(min_size_limit)
+ self.indexeur = value #stock la value, pour l'indexation
self.default = self.validate(value)
-
+
+ def __getitem__(self, key): # obligation de redéfinir l'indexation
+ return self.indexeur[key] #
+
class TColorProperty(TutoriusProperty):
"""
Represents a RGB color with 3 8-bit integer values.