In 3.6, we introduced a new prefix, 'f', so there was no back
compatibility issue. There was, however, a combinatorial explosion
issue, as 'F' was also added (a mistake, I now think), and no order
requirement (possibly another mistake). Hence
stringprefix ::= "r" | "u" | "R" | "U"
grew to
stringprefix ::= "r" | "u" | "R" | "U" | "f" | "F"
| "fr" | "Fr" | "fR" | "FR" | "rf" | "rF" | "Rf"
| "RF"
New unordered 'd' and 'D' prefixes, for 'dedent', applied to multiline
strings only, would multiply the number of alternatives by about 5 and
would require another rewrite of all code (Python or not) that parses
Python code (such as in syntax colorizers).
I think you're exaggerating the difficulty somewhat. Multiplying the
number of alternatives by 5 is not the same thing as increasing the
complexity of code to parse it by 5.
A new string prefix, 'd' say, would seem to be the best way of meeting
the OP's requirement.
That said, I'm about +0 on such a proposal, given that there are already
reasonable ways of doing it.
Regards
Rob Cliffe
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/