Pip, <= 2 (crackedcracked by Reto Koradi)
{Name(a,None,None)}{Name(a,None,None)}
This works in the current version of Pip as of this posting (0.15.10.04), and a couple versions prior. Future updates may change this output. I felt a bit bad about posting something so implementation-dependent, but including a <=2 that isn't blindingly obvious was too fun to pass up.
The code is O_
.
_
is the identity function. It's syntactic sugar for the longer form{a}
, which is equivalent tolambda a: a
in Python.- In the current version of Pip, I haven't finalized the format of Blocks when converting to Scalars (i.e. strings). Eventually, it's going to look like
{a}
, but at the moment it wraps the parse tree in curly braces, resulting in the above{Name(a,None,None)}
business. O
is a unary operator that outputs its operand (after casting to Scalar) sans newline.- Since
O
is an operator, the wholeO_
is an expression that evaluates to the same identity function. If a Pip program ends with an expression, that expression is auto-printed. Thus,{Name(a,None,None)}
gets output a second time.