From 7e7a7bf936fbc7c8771327ba7eb9c948499d118d Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Fri, 15 May 2020 23:55:56 +0200 Subject: [PATCH] registry: Explain why Value.set sets self._wasSet. --- src/registry.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/registry.py b/src/registry.py index 4cb1f8bc3..e16a2ba8e 100644 --- a/src/registry.py +++ b/src/registry.py @@ -442,6 +442,9 @@ class Value(Group): """Override this with a function to convert a string to whatever type you want, and call self.setValue to set the value.""" self.setValue(s) + + # redundant as setValue() already sets it, but it avoids really hard + # bugs if subclasses mess with _setValue. self._wasSet = True def setValue(self, v):