There's a little forth program written in python here #http://openbookproject.net/py4fun/forth/forth.py I'm struggling to understand what these lines mean.
def rJnz (cod,p) : return (cod[p],p+1)[ds.pop()] def rJz (cod,p) : return (p+1,cod[p])[ds.pop()==0] Specifically I'm stuck on what (code[p], followed by p+1 does inside the brackets and also what [ds.pop()] abd [ds.pop==0] does afterwards I do know that p is an integer cod[p] is one of a list of functions that are stored in cod ds.pop() is popping the top of the ds list and ds.pop() == 0 either means that the result popped is 0 or that there are no items left in list ds[] Any help much appreciated
-- http://mail.python.org/mailman/listinfo/python-list