Exemplo n.º 1
0
 def deepmembers(self, mz=mfilter, ci=chain_iter, gc=getcls):
     '''collect members of incoming things and their bases'''
     _mz = ft.partial(mz, self._call)
     with self._sync as sync:
         if ct.port.PY3:
             def _memfilters(thing, mz=_mz, gc=gc):
                 t = lambda x: not x[0].startswith('mro')
                 return ct.filter(
                     t, ci(ct.map(mz, ci([getmro((gc(thing))), [thing]])))
                 )
         else:
             def _memfilters(thing, mz=_mz, gc=gc):
                 return ci(ct.map(mz, ci([getmro((gc(thing))), [thing]])))
         sync(ci(ct.map(_memfilters, sync.iterable)))
     return self
Exemplo n.º 2
0
 def members(self, _mz=mfilter, _ci=it.chain.from_iterable):
     '''collect members of incoming things'''
     _mz = ft.partial(_mz, self._call)
     with self._sync as sync:
         sync(_ci(ct.map(_mz, sync.iterable)))
     return self
Exemplo n.º 3
0
 def _memfilters(thing, mz=_mz, gc=gc):
     return ci(ct.map(mz, ci([getmro((gc(thing))), [thing]])))
Exemplo n.º 4
0
 def _memfilters(thing, mz=_mz, gc=gc):
     t = lambda x: not x[0].startswith('mro')
     return ct.filter(
         t, ci(ct.map(mz, ci([getmro((gc(thing))), [thing]])))
     )