[Python-ideas] Dart like multi line strings identation
m.raesener at gmail.com
Sun Apr 1 03:39:31 EDT 2018
Ok I see this is nothing for any 3.x release.
I imagine this now either ‚clean‘ for users with compatibility break or
just leave things as they are.
So, if at all, maybe something for Python 4 :)
Coincidence I watched yesterday Armin Ronachers talk related to seeing
compatibility as the holy cow - interesting watch...
Steven D'Aprano <steve at pearwood.info> schrieb am So. 1. Apr. 2018 um 03:49:
> On Sun, Apr 01, 2018 at 02:20:16AM +0100, Rob Cliffe via Python-ideas
> > >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.
> Terry didn't say that it would increase the complexity of the code by a
> factor of five. He said it would multiply the number of alternatives by
> "about 5". There would be a significant increase in the complexity of
> the code too, but I wouldn't want to guess how much.
> Starting with r and f prefixes, in both upper and lower case, we have:
> 4 single letter prefixes
> (plus 2 more, u and U, that don't combine with others)
> 8 double letter prefixes
> making 14 in total. Adding one more prefix, d|D, increases it to:
> 6 single letter prefixes
> (plus 2 more, u and U)
> 24 double letter prefixes
> 48 triple letter prefixes
> making 80 prefixes in total. Terry actually underestimated the explosion
> in prefixes: it is closer to six times more than five (but who is
> counting? apart from me *wink*)
> [Aside: if we add a fourth, the total becomes 634 prefixes.]
> Python-ideas mailing list
> Python-ideas at python.org
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas