def members(self): '''collect object members from incoming things''' with self._context(): mfilter, call = self._mfilter, self._call return self._xtend(ichain(imap( lambda x: mfilter(call, x), self._iterable, )))
def extract(self): '''extract object members from incoming things''' with self._context(): walk_ = self._extract call_, alt_, wrap_ = self._call, self._alt, self._wrapper return self._xtend(ichain(imap( lambda x: walk_(call_, alt_, wrap_, x), self._iterable, )))
def deepmembers(self): '''collect object members from incoming things and their bases''' _mf = self._mfilter _mz = lambda x: _mf(self._call, x) def _memfilters(thing, mz=_mz, gc=getcls, ci=ichain): return ci(imap(mz, ci([getmro((gc(thing))), [thing]]))) with self._context(): return self._xtend( ichain(imap(_memfilters, self._iterable)) )
def items(self): """invoke call on each mapping to get key, value pairs""" with self._context(): return self._xtend(starmap(self._call, ichain(imap(items, self._iterable))))