Do you find that ; is used anywhere outside of python -c 'import X; do something quick with X' contexts? I never encounter it elsewhere.
Once you start needing code blocks, one-liners seem counter-productive. In any case, ; has a clear enough meaning from essentially all other languages, which aids its readability. !; does not. There is also already a proposal for !: PEP 638 – Syntactic Macros | peps.python.org.
The proposal should be ; followed by as many !s as needed. That aside, it is pretty fundamental to Python’s visual design that suite keywords must be the first word on a line.
While I agree with your assessment, I don’t think quoting the zen is helpful. It’s a nice poem but any good arguments against or for an idea should not need it as a source
IIRC, the Python IRC channel on FreeNode had (is it still operational?) a bot that would take one-liner input and re-indent it and upload it to a pastebin site. Its convention was to interpret additional consecutive semicolons as dedents after the first.
Make lparen after : start a block without significant whitespace and the matching rparen close it. Within this block, multiple consecutive statements must be separated by semicolons and any colon must be followed by lparen.
for i in range(10): (if i % 3: (print(“.”)) else: (print(“*”))
Technically, after a colon there is an ambiguity between a block containing a single statement expression and a statement expression consisting of a parenthesized expression. But it doesn’t really matter because they are effectively the same.
In python significant whitespace is already disabled inside parentheses and expressions can span multiple lines. This extends it to statements, too. Assuming this idea is deemed worth implementing, think this is a better syntax for it.
is a valid, if useless, loop that repeatedly defines and discards a generator expression. Under your proposal, it would become a syntax error, equivalent to