def localize(self, thing, *args, **kw): ''' local settings from thing and its base classes plus any custom settings @param thing: some thing with local settings ''' return twoq([type.mro(getcls(thing)), [thing]]).smash().pick('Meta' ).members().tap(lambda x: not x[0].startswith('__')).filter().reup( ).wrap(stuf).map().invoke('update', *args, **kw).value()
def links(self): '''sequence of all links''' return self._links(self, getcls(self))
def nodes(self): '''connector to all nodes linked to this node''' return self._nodes(self, getcls(self))
def reset(self): '''reset previously accessed `lazybase` attributes''' this = vars(self) t = lambda x, y: x in this and isinstance(y, lazybase) exhaustmap(items(vars(getcls(self))), delattr, t)