Don't use backslashes \ to split lines - especially in shell scripts
# actually remove old settings before redeploying, else it will append
ssh user@host \rm-r .config
Somehow I got bitten by that once where the character after backslash became inline whitespace and caused a hard to find bug with the second part becoming a new statement on a new line.
Using parentheses usually gets us out of r trouble, and allows more granular commenting:
tokens=(
ssh user@host
# actually remove old settings before redeploying, else it will appendrm-r .config
)"${tokens[@]}"
In python it's less likely to be an issue, but it's still nice for inline commenting
asserti_did_it(data), \
"You did not"+ \
f"You did: {data}"
Don't use backslashes
\to split lines - especially in shell scriptsSomehow I got bitten by that once where the character after backslash became inline whitespace and caused a hard to find bug with the second part becoming a new statement on a new line.
Using parentheses usually gets us out of r trouble, and allows more granular commenting:
In python it's less likely to be an issue, but it's still nice for inline commenting