Matt, could you elaborate? Sorry, not quite sure what the ? means -- does that mean 'or'? Also not sure about what you mean by the phrase ternary syntax.
Here is loosely what I am trying to do: for i in testarray > if testarray > 0 > do this > else > do nothing > It seemed to work when I tested it with nothing after else? On Tuesday, July 22, 2014 5:51:24 PM UTC-4, Matt Bauman wrote: > > The ternary syntax is one place where an empty block won't suffice — there > must be an expression in both branches. In such a case, you can use > `nothing` (which is also what an empty block will return). That said, > it's more typical to refactor these cases into short-circuiting expressions: > > cond ? expr : nothing # could be written as: > cond && expr > > cond ? nothing : expr # becomes: > cond || expr >
