16.1.2.2. DictWithDirtyFlag¶
-
class
xattrfile.
DictWithDirtyFlag
[source]¶ Bases:
dict
Dictionnary with modification (dirty) flag.
This class overrides dict class. When this dict is modified, the dirty flag is set to True. Of course, you can reset the dirty flag manually. It is just a flag. You have to implement what you want with it.
Example
>>> d = DictWithDirtyFlag() >>> d.dirty False >>> d['foo'] = 'bar' >>> d.dirty True >>> # do what you want... >>> d.dirty = False >>> d['foo2'] = 'bar2' >>> d.dirty True
Variables: dirty (boolean) – the dirty flag Attributes Summary
dirty
Attributes Documentation
-
dirty
= False¶
-