PEP 822: Dedented Multiline String (d-string)

IMO the ground has been trod pretty thoroughly here. Does it make sense for the trailing newline discussion to go into a Rejected Ideas section? If people agree that their position is either adopted by the PEP or fairly represented in the Rejected Ideas, then it’s up to the SC to decide whether to adopt the PEP as-is or request to switch.

Along those lines, I think the from __future__ alternative should mention its benefits in addition to its reasons for rejection. “This could help simplify Python’s grammar in the future” is the smallest of them, IMO. There are already two interpretations: regular multiline strings and docstrings. Further, the PEP itself is evidence that there is a desire for another interpretation. Using from __future__ would allow a transition to a single consistent interpretation, which benefits users, teachers and students. I do think that “a transition is practically impossible” is a valid argument against it (although I disagree), so it’s fine for the PEP to take the position that three interpretations is the best we can hope to achieve.

It would also be worth noting when citing the vote for new syntax over __future__, the poll did not permit multiple acceptable choices:

Thanks for the PEP!

5 Likes