Author jtojnar
Recipients Marco Sulla, Miguel Amaral, gregory.p.smith, josh.r, jtojnar, mbussonn, methane, pablogsal, remi.lapeyre, rhettinger, serhiy.storchaka, steven.daprano, terry.reedy
Date 2020-12-03.22:44:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
One benefit of using a compile time feature over a runtime method is that the former allows for more predictable dedenting by first dedenting and only then interpolating variables.

For example, the following code does not dedent the test string at all:

import textwrap

foo = "\n".join(["aaa", "bbb"])

test = textwrap.dedent(
    block xxx:

It would be much nicer if we had syntactical dedents based on the leftmost non-whitespace column in the string, as supported by Nix language, for example.

test = (
    block xxx:
    {textwrap.indent(foo, ' '*4)}

It would be even nicer if the interpolated strings could be indented based on the column the interpolation occurs in but that can at least be done at runtime with only minor inconvenience.
Date User Action Args
2020-12-03 22:44:32jtojnarsetrecipients: + jtojnar, rhettinger, terry.reedy, gregory.p.smith, steven.daprano, methane, serhiy.storchaka, josh.r, mbussonn, pablogsal, remi.lapeyre, Marco Sulla, Miguel Amaral
2020-12-03 22:44:32jtojnarsetmessageid: <>
2020-12-03 22:44:32jtojnarlinkissue36906 messages
2020-12-03 22:44:31jtojnarcreate