예제 #1
0
파일: rnu.py 프로젝트: lukovnikov/teafacto
 def recappl(self, inps, states):
     numrecargs = getnumargs(self.rec) - 2       # how much to pop from states
     mystates = states[:numrecargs]
     tail = states[numrecargs:]
     inps = [inps] if not issequence(inps) else inps
     outs = self.rec(*(inps + mystates))
     return outs[0], outs[1:], tail
예제 #2
0
 def recappl(self, inps, states):
     numrecargs = getnumargs(self.rec) - 2  # how much to pop from states
     mystates = states[:numrecargs]
     tail = states[numrecargs:]
     inps = [inps] if not issequence(inps) else inps
     outs = self.rec(*(inps + mystates))
     return outs[0], outs[1:], tail
예제 #3
0
 def numstates(self):
     return getnumargs(self.rec) - 2
예제 #4
0
파일: rnu.py 프로젝트: lukovnikov/teafacto
 def numstates(self):
     return getnumargs(self.rec) - 2