I've been annoyed by my lack of a way to put "multi-line one-liner" python code into my bash code with reasonable indentation.
This discussion suggested a workaround: Make the first line `if 1:`, then you can indent all you like on the second line. Good enough for me!
Allowing indented code for `-c`
Jon Crall posted this feature proposal on the Ideas mailing list and a GitHub issue in April. It needs wider discussion, so I’m re-posting it here. I’ll add my own comment below. The Python CLI should automatically dedent the argument given to “-c”. I raised this issue on the Python-Ideas mailing list and it got some positive feedback, so I’m moving forward with it here and in a proof-of-concept PR. Pitch I have what I think is a fairly low impact quality of life improvement to suggest for t...