def __setitem__(self, key, val): if not isinstance(val, AlgorithmNode): raise TypeError, evalFmt( '{self.nodePath} only accepts instance of Algorithm or of its subclasses.' ) if key != val.meta.name: raise ValueError, 'The key should be identical to the name of the algorithm.' NodeDict.__setitem__(self, key, val)
def __setitem__(self, key, val): if not isinstance(val, WindowNode): raise TypeError, evalFmt( '{self.nodePath} only accepts instance of WindowNode or of its subclasses.' ) if key != id(val): raise ValueError, 'The key should be identical to the ID of the window.' NodeDict.__setitem__(self, key, val)
def __setitem__(self, key, val): if not isinstance(val, AlgorithmNode): raise TypeError, evalFmt('{self.nodePath} only accepts instance of Algorithm or of its subclasses.') if key != val.meta.name: raise ValueError, 'The key should be identical to the name of the algorithm.' NodeDict.__setitem__(self, key, val)
def __setitem__(self, key, val): if not isinstance(val, WindowNode): raise TypeError, evalFmt("{self.nodePath} only accepts instance of WindowNode or of its subclasses.") if key != id(val): raise ValueError, "The key should be identical to the ID of the window." NodeDict.__setitem__(self, key, val)