#Pyth, 6 bytes
Pyth, 6 bytes
¡¡$¡"¡
¡
is an unimplemented character, meaning that if the Pyth parser ever evaluates it, it will error out with a PythParseError. The code ensures this will happen on one of the ¡
s.
There are three ways a byte can be present in a Pyth program, and not be parsed: In a string literal ("
or ."
, which are parsed equivalently), in a Python literal ($
) and immediately after a \
.
This code prevents \
from making it evaluate without error, because that only affects the immediately following byte, and the second ¡
errors.
$
embeds the code within the $
s into the compiled Python code directly. I make no assumptions about what might happen there.
If the program reaches this code in a $
context, it will end at the $
, and the ¡
just after it will make the parser error. Pyth's Python literals always end at the next $
, regardless of what the Python code might be doing.
If the program starts in a "
context, the "
will make the string end, and the final ¡
will make the parser error.