diff --git a/fluents/annotations.py b/fluents/annotations.py index 9b8890b..1aa7fcb 100644 --- a/fluents/annotations.py +++ b/fluents/annotations.py @@ -39,7 +39,9 @@ class AnnotationHandler: class DictAnnotationHandler(AnnotationHandler): - def __init__(self, d={}): + def __init__(self, d=None): + if d == None: + d = {} self._dict = d def get_annotations(self, annotationname, ids, default=None): diff --git a/fluents/selections.py b/fluents/selections.py index d3684a6..f7a0165 100644 --- a/fluents/selections.py +++ b/fluents/selections.py @@ -73,11 +73,11 @@ class IdListController: if dimname == self._dimension: return + self._dimension = dimname self.set_annotation(self._annotation.get(dimname, None)) if not self._annotation.has_key(dimname): self._annotation[dimname] = None - self._dimension = dimname def set_annotation(self, annotation): """Set the displayed annotation to annotation. If annotation is None,