Commit Graph

7 Commits

Author SHA1 Message Date
Alyssa Coghlan 8ae21fff71
PEP 501: Withdraw in favour of PEP 750 (#4070) 2024-10-19 07:00:43 -07:00
Alyssa Coghlan e660248bea
PEP 501: Minor editing fixes (#3946)
Also fixes an incorrect comment about the impact
a CPython operand precedence bug will have on the
way template literals interact with regular strings.
2024-09-13 08:53:53 +00:00
Alyssa Coghlan 147c58257f
PEP 501: update for tagged strings (#3944)
* switch to lazy conversion specifier processing (includes adding `operator.convert_field`)
* added proposal for `!()` as a new conversion specifier that invokes `__call__` (rather than `__repr__` or `__str__`)
* add `render_text` callback to `TemplateLiteral.render` signature (default value: `str`)
* new protocol: `typing.InterpolationTemplate` (protocol corresponding to the concrete `types.TemplateLiteral` type)
* new protocol: `typing.TemplateText` (equivalent to `Decoded` from PEP 750)
* new protocol: `typing.TemplateField` (inspired by `Interpolation` from PEP 750, with adjustments for eager field evaluation)
* new concrete type: `types.TemplateLiteralText` (equivalent to `DecodedConcrete` from PEP 750)
* new concrete type: `types.TemplateLiteralField` (inspired by `InterpolationConcrete` from PEP 750, with adjustments for eager field evaluation)
* added iteration support to `TemplateLiteral`, producing `TemplateLiteralText` and `TemplateLiteralField` instances in their order of appearance (keeping the "no empty TemplateLiteralText entries" rule from PEP 750)
* change the way `TemplateLiteral` works based on the way PEP 750 works
* added or updated discussion notes about several included and deferred features

Closes #3904
2024-09-04 23:15:40 +10:00
Cornelius Roemer 89ae6e0e30
Fix typos in PEPs using codespell (#3909) 2024-08-20 13:29:32 +03:00
Nick Humrich 1696887355
PEP 501: update to template strings proposal (#3047)
* Re-open PEP 501 in consideration of PEP 701
* Switch naming from "interpolation template strings" to "template literal string"
* Add Nick Humrich as co-author

---------

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-08-13 02:11:40 +10:00
Alyssa Coghlan 6f1da2042d
Update references to Alyssa Coghlan (#3475)
* For most cases (including all PEP metadata), replace birth name with chosen name
* Birth name has been retained in parentheses when this makes other references
  substantially clearer (e.g. references to mailing list posts, elected members
  of the inaugural Steering Council)
2023-10-11 14:05:51 +02:00
Adam Turner 08d688fdca
All PEPs: Move to ``peps/`` folder (#3418) 2023-09-09 18:39:29 +01:00