Inheritance of bags and better jupyter output for pretty printer.

This commit is contained in:
Romain Dorgueil
2017-11-28 21:58:01 +01:00
parent c7ff06a742
commit d8c0dfe11a
10 changed files with 180 additions and 51 deletions

View File

@ -46,6 +46,9 @@ class Setting:
def __eq__(self, other):
return self.get() == other
def __bool__(self):
return bool(self.get())
def set(self, value):
value = self.formatter(value) if self.formatter else value
if self.validator and not self.validator(value):