On Sun, Sep 20, 2015 at 5:36 AM, Eric V. Smith <eric at trueblade.com> wrote: > As the PEP says, the expression with '+' is illustrative, not how it's > actually implemented. The implementation currently uses ''.join, > although I reserve the right to change it. > >> or even to >> >> 'abc{:spec1}{!r:spec2}def{!s}ghi'.format(expr1, expr2, expr3) > > That's surprisingly difficult to get right. I've implemented the code at > least 3 different ways, and the current implementation seems the most > straightforward. I might add a special opcode to use a _PyUncode_Writer, > though. Since this is entirely under the control of the parser, there's no particular reason to promise anything about the implementation or its performance metrics. The semantics won't change if CPython 3.7.4 decides to change to using ''.join() instead of concatenation. Let's not bikeshed the implementation details. I'm sure Eric knows what he's doing. ChrisA
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4