def __eq__(self, rhs): # self == rhs if isinstance(rhs, dict): raise NotYetImplemented() elif isinstance(rhs, tvstruct): return self._nvs() == rhs._nvs() else: return False
def _eachHelper(xs:(N**T1)[tvseq], f:T1^T2, tByT) -> dict: t1 = tByT[T1] d, tByT_f = selectDispatcher(f, (t1,)) t2 = d.retType if hasT(t2): raise NotYetImplemented() answer = dict(tByT) answer[T2] = t2 return answer
def __rshift__(p, arg): # func >> arg if p.numRight == 0: return NotImplemented else: if isinstance(p, rau): if isinstance(arg, _SingleDispatcher): if arg.style in (nullary, unary, binary, ternary): raiseLessPipe( TypeError( f'An rau may not consume a nullary, unary, binary, ternary' )) if arg.style == rau: raiseLessPipe(NotYetImplemented('could make sense...')) if len(p.iTBC) != p.numPiped: raise SyntaxError( f'needs {len(p.iTBC)} args but {p.numPiped} will be piped' ) newArgs = _atPut(p.args, p.iTBC[0:1], [arg]) elif isinstance(p, binary): if not p.isPiping: raiseLessPipe( SyntaxError( f'syntax not of form {_prettyForm(p.__class__)}')) newArgs = _atPut(p.args, p.iTBC[0:1], [arg]) elif isinstance(p, ternary): if not p.isPiping: raiseLessPipe( SyntaxError( f'syntax not of form {_prettyForm(p.__class__)}')) if len(p.iTBC) == 2: newArgs = _atPut(p.args, p.iTBC[0:2], [arg, TBC]) elif len(p.iTBC) == 1: newArgs = _atPut(p.args, p.iTBC[0:1], [arg]) else: raiseLessPipe(ProgrammerError()) else: raiseLessPipe(ProgrammerError()) return p.__class__(p.dispatcher, True, newArgs, p.kwargs)
def rDropBack(r, n): raise NotYetImplemented()
def roundHalfToPos(x): raise NotYetImplemented()
def rFilter(r, f): raise NotYetImplemented()
def rTakeBack(r, n): raise NotYetImplemented()
def roundHalfToNeg(x): raise NotYetImplemented()
def rInject(r, seed, f): raise NotYetImplemented()
def sortBy(agg, names, directions): raise NotYetImplemented()
def fromreject(listr, wherePreds): raise NotYetImplemented()
def groupBy(a: agg, keys, directions): "answers a collection of groups" raise NotYetImplemented()
def chunkBy(a: agg, names): "answers a range of range of row" raise NotYetImplemented()
def isequenceBreaks(soa, names): '''as above but also includes the index of the break''' raise NotYetImplemented()
def sequenceBreaks(soa, names): '''answers a new list with each difference item e.g. hello -> h, e, l, o''' raise NotYetImplemented()
def fromupdate(defs, byNames, agg, wherePreds): raise NotYetImplemented()
def sortUsing(soa, f): raise NotYetImplemented()
def aj(agg1:agg, agg2:agg): raise NotYetImplemented()
def sortBy(agg, names): raise NotYetImplemented()
def fromselect(listr, defs, byNames, wherePreds): raise NotYetImplemented()
def til(n:pyint): # First n natural numbers (starting at 0) raise NotYetImplemented()
def rZip(r): raise NotYetImplemented()
def interleave(a:(N**T1)[tvseq], b: (N**T1)[tvseq]) -> (N**T1)[tvseq]: raise NotYetImplemented()
def roundHalfFromZero(x): raise NotYetImplemented()