Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEP 750: major updates to "Template Strings" based on community feedback #4062

Merged
merged 173 commits into from
Oct 22, 2024
Merged
Changes from 170 commits
Commits
Show all changes
173 commits
Select commit Hold shift + click to select a range
988967a
Start work on post-sprint PEP 750 update.
davepeck Sep 27, 2024
33939ee
Let's get started
davepeck Sep 27, 2024
8a62a48
Update PEP 750 to use Template and Interpolation classes in a proposa…
koxudaxi Sep 28, 2024
e3300fe
Update Specification section in PEP 750
koxudaxi Sep 28, 2024
3d917d7
Fix interpolation attributes in examples
koxudaxi Sep 28, 2024
f4ba6fe
Update Specification
koxudaxi Sep 28, 2024
babe2c2
Add Raw Template Strings
koxudaxi Sep 28, 2024
1656dc1
Merge pull request #1 from koxudaxi/pep750-post-sprint-update
koxudaxi Sep 29, 2024
4bc3307
Update PEP 750: Adjust class definition and usage
koxudaxi Sep 29, 2024
42265a7
Refactor tag strings to template strings
koxudaxi Sep 29, 2024
3e13a69
Refactor PEP 750 terminology from 'tag' to 'template' strings
koxudaxi Sep 29, 2024
e4f1554
Refactor PEP 750 terminology from 'tag' to 'template' strings
koxudaxi Sep 29, 2024
427194e
Refactor PEP 750 terminology from 'tag' to 'template' strings
koxudaxi Sep 29, 2024
1bd26d0
Update Memoizing
koxudaxi Sep 29, 2024
3841518
Revert example code
koxudaxi Sep 29, 2024
4be9d4a
Strip mytag
koxudaxi Sep 29, 2024
b0e9523
Many updates. Starting to get there, maybe?
davepeck Oct 8, 2024
171cf15
Minor updates.
davepeck Oct 8, 2024
65d17ab
Merge branch 'main' into pep750-post-sprint-update
davepeck Oct 8, 2024
c38bf3d
Shrubbery
davepeck Oct 9, 2024
2fa44a9
Minor update
davepeck Oct 9, 2024
dca351b
Minor update
davepeck Oct 9, 2024
b433491
Update
davepeck Oct 9, 2024
79bbc52
Hello no comma
davepeck Oct 9, 2024
fd8c97e
Format specification
davepeck Oct 9, 2024
bead99c
Clarify
davepeck Oct 9, 2024
e149e33
Particular
davepeck Oct 9, 2024
53fb3a4
Better words
davepeck Oct 9, 2024
231caf6
Odd length
davepeck Oct 9, 2024
06c2ef6
Structured
davepeck Oct 9, 2024
0318f59
Add comments on examples
koxudaxi Oct 9, 2024
ecb866f
Merge branch 'main' into pep750-post-sprint-update
davepeck Oct 9, 2024
769d6fd
Use simple for-loop instead of comprehension. Closes #6
davepeck Oct 9, 2024
0998524
Use str(arg.value)
davepeck Oct 9, 2024
6acd8f6
Maybe clearer?
davepeck Oct 9, 2024
463b7b1
Whee
davepeck Oct 9, 2024
0947764
Clarify
davepeck Oct 9, 2024
7f81ffc
Maybe good enough on "rejected ideas"?
davepeck Oct 9, 2024
2ae7505
Merge branch 'main' into pep750-post-sprint-update
davepeck Oct 9, 2024
9f57221
Fix a typo or two
davepeck Oct 9, 2024
781fb7c
Note to self
davepeck Oct 9, 2024
f38a588
No longer note to self
davepeck Oct 9, 2024
37648b8
paragraph break
davepeck Oct 9, 2024
3350877
Explicitly describe Template and Interpolation construction. Fix form…
davepeck Oct 10, 2024
cc869c9
Match args
davepeck Oct 10, 2024
c012123
Merge branch 'main' into pep750-post-sprint-update
davepeck Oct 10, 2024
556b316
Take a stab at 'common patterns'
davepeck Oct 10, 2024
4873586
f-strings with t-strings
davepeck Oct 10, 2024
fc73090
f-strings with t-strings
davepeck Oct 10, 2024
a40867d
Examples section
davepeck Oct 10, 2024
eb7a27c
Update to match PEP 12 title style.
davepeck Oct 14, 2024
f25c110
In progress: logging example.
davepeck Oct 14, 2024
1d809de
Clean up f-strings a bit.
davepeck Oct 14, 2024
beb4af8
Clarify
davepeck Oct 14, 2024
4f32753
Write up the first approach to structured logging.
davepeck Oct 14, 2024
be4ab1b
In progress
davepeck Oct 14, 2024
fd72f18
Write up
davepeck Oct 14, 2024
d5aabcf
Add Dave as author.
pauleveritt Oct 14, 2024
a7320d6
Wrap up approach 2 to structured logging.
davepeck Oct 14, 2024
a135095
Minor clean-ups.
davepeck Oct 14, 2024
18239f7
Fix exceptions section
davepeck Oct 14, 2024
51e08f9
Fix _does_
davepeck Oct 14, 2024
856f9a6
Fix run-on
davepeck Oct 14, 2024
6d34ab2
Beef up acknowledgements
davepeck Oct 14, 2024
2872c6f
More acknowledgements
davepeck Oct 14, 2024
3a0c1f4
Easily read their logs
davepeck Oct 14, 2024
08a613f
the -> this
davepeck Oct 14, 2024
72fcb62
Improve interleaving section somewhat
davepeck Oct 14, 2024
6cef8b4
Add two new rejected ideas: ${foo} and !()
davepeck Oct 14, 2024
3087b04
Remove an excess tick mark
davepeck Oct 14, 2024
b744d51
Slight fix
davepeck Oct 14, 2024
c032dcc
Better wordsmithing in acknowledgements
davepeck Oct 14, 2024
1e1ec2e
Update async section
davepeck Oct 15, 2024
ac97b9c
Clean up async section
davepeck Oct 15, 2024
6315b63
Minor fix to logging example
davepeck Oct 15, 2024
15541a2
Bugfix the log links
davepeck Oct 15, 2024
eb6e919
Further minor logging example fixes
davepeck Oct 15, 2024
019a1f9
Remove obsolete 'tool support' section
davepeck Oct 15, 2024
9d38328
Fix an example code
koxudaxi Oct 15, 2024
845db87
Fix section links
koxudaxi Oct 15, 2024
b78204c
Add type-hint
koxudaxi Oct 15, 2024
5cc22ec
Fix typo
koxudaxi Oct 15, 2024
7b835a9
Fix typo
koxudaxi Oct 15, 2024
eba2287
Minor improvements to async section
davepeck Oct 15, 2024
4337813
Further improvements to async section
davepeck Oct 15, 2024
d8b7b91
Mention iterables
davepeck Oct 15, 2024
3cc1e80
Mention iterators in the section on lazy evaluation (thanks, Koudai A…
davepeck Oct 15, 2024
8d6f0dd
Minor fix to html evil example
davepeck Oct 15, 2024
f9204f2
Final fix to evil example
davepeck Oct 15, 2024
6d74905
Merge branch 'main' into pep750-post-sprint-update
davepeck Oct 15, 2024
ed63d71
Fix logging.formatters weirdness
davepeck Oct 15, 2024
49419c3
Fix value(s) weirdness
davepeck Oct 16, 2024
44bbe82
Change writing to 'equivalent semantics'; remove __format__ example
davepeck Oct 16, 2024
cf8602a
Match html() return type with examples repository.
davepeck Oct 16, 2024
a647f9e
Clean up html example a tiny bit.
davepeck Oct 16, 2024
330b6d2
Further fixes based on discord conversation
davepeck Oct 16, 2024
f24d0e2
Make `Element` match example code.
davepeck Oct 16, 2024
5391750
I think I found a way to have our interleaving cake and eat it too.
davepeck Oct 16, 2024
ca05641
Fix mention of repr, str, and ascii (make 'em code)
davepeck Oct 16, 2024
e8121e0
Merge branch 'main' into pep750-post-sprint-update
davepeck Oct 16, 2024
54f0a1f
Fix single backtick lint issue
davepeck Oct 16, 2024
4505577
Mention rt combination in section describing literals
davepeck Oct 16, 2024
8acbffb
Merge branch 'main' into pep750-post-sprint-update
davepeck Oct 16, 2024
22ac80e
Minor update to the PEP
lysnikolaou Oct 16, 2024
04e689f
Bugfix: `callable` -> `Callable`.
davepeck Oct 16, 2024
f5cf6d1
Explain eager evaluation of interpolated format specifiers in t-strings.
davepeck Oct 16, 2024
45ef598
Slightly fewer words.
davepeck Oct 16, 2024
3d5d3f1
Merge pull request #17 from davepeck/lysnikolaou-patch-1
davepeck Oct 16, 2024
2d2b39d
Make all values 42, the only true answer.
davepeck Oct 16, 2024
ce61b4d
Add Koudai Aono as a co-author! 🎉
davepeck Oct 16, 2024
0ed9eaf
Put Koudai in front of me -- he was here first!
davepeck Oct 17, 2024
a318d24
Final round of feedback on the PEP
lysnikolaou Oct 17, 2024
5979050
Remove wrong comment
lysnikolaou Oct 17, 2024
a4e2963
Minor updates
davepeck Oct 17, 2024
0276e9f
Merge pull request #18 from davepeck/lysnikolaou-patch-1
davepeck Oct 17, 2024
e83d206
Merge branch 'main' into pep750-post-sprint-update
davepeck Oct 17, 2024
a69faf4
Split authors into multiple lines
davepeck Oct 17, 2024
06ae6f8
Resolve a few comments.
davepeck Oct 17, 2024
ddf1a8b
Simplify SQL injection attack language in Motivation section
davepeck Oct 17, 2024
62aef58
Minor text cleanup
davepeck Oct 17, 2024
2d9c100
A stab at SQL and HTML in one place
davepeck Oct 17, 2024
556e633
Take a stab at slight collapse of motivation section content
davepeck Oct 17, 2024
f21e61c
Clarify quote marks
davepeck Oct 17, 2024
6774da7
Fix quote marks
davepeck Oct 17, 2024
ff754df
improve example code links
davepeck Oct 17, 2024
e94a8ab
Fix ref
davepeck Oct 17, 2024
3fe7417
Grammar, not DSL?
davepeck Oct 17, 2024
1809314
Fix the Post-History header for real
davepeck Oct 17, 2024
b1d4c4c
Update peps/pep-0750.rst
davepeck Oct 17, 2024
7db74af
Update peps/pep-0750.rst
davepeck Oct 17, 2024
b8dfda2
Order headers correctly
davepeck Oct 17, 2024
de66fb9
Merge branch 'pep750-post-sprint-update' of github.com:davepeck/peps …
davepeck Oct 17, 2024
a512045
Active voice rewrite
davepeck Oct 17, 2024
0bef634
Simplify no concatenation section
davepeck Oct 17, 2024
4fde199
clarify debug specifier
davepeck Oct 17, 2024
c4643e2
simplify debug specifier section
davepeck Oct 17, 2024
c3d583f
Remove 'target grammar'
davepeck Oct 17, 2024
422c5df
Revise the 'how to teach this' section.
davepeck Oct 17, 2024
fe6de41
Remove trailing whitespace
lysnikolaou Oct 18, 2024
1d42f5f
Specify that t-strings and f-strings cannot be mixed
lysnikolaou Oct 18, 2024
9f2643f
Remove "suggestive" use of @dataclass; directly show __init__
davepeck Oct 18, 2024
918bf1a
Whoops, get rid of vestigial @dataclass decorator
davepeck Oct 18, 2024
a9093c0
Add a note about Interpolation.conv to rejection
davepeck Oct 18, 2024
479c58f
Add more color to our rejection reasons.
davepeck Oct 18, 2024
87accd6
Fix example code references in PEP 750
davepeck Oct 18, 2024
ff60f58
expessiveness -> expressiveness
davepeck Oct 18, 2024
d3012a2
Spelling fix
davepeck Oct 18, 2024
1612f45
Link to the correct section
davepeck Oct 18, 2024
ab404af
Fix example references for aformat()
davepeck Oct 18, 2024
89e6f92
Merge branch 'main' into pep750-post-sprint-update
davepeck Oct 18, 2024
8425079
Minor text fix.
davepeck Oct 19, 2024
592a541
Merge branch 'pep750-post-sprint-update' of github.com:davepeck/peps …
davepeck Oct 19, 2024
2c8f806
After extensive discussion, allow concatenation.
davepeck Oct 21, 2024
6372f48
Merge branch 'main' into pep750-post-sprint-update
davepeck Oct 21, 2024
f404cdf
Remove unnecessary `that`
davepeck Oct 21, 2024
06fb769
Fix heading length
davepeck Oct 21, 2024
e2690d1
Remove needless extra "and"
davepeck Oct 21, 2024
0836d12
Clarify what we mean about bringing logic to Python
davepeck Oct 21, 2024
cd1ee92
Better writing in "interleaving" section
davepeck Oct 21, 2024
2ef8267
Update peps/pep-0750.rst
davepeck Oct 21, 2024
249ccc4
You add some egg and you lose some too.
davepeck Oct 21, 2024
9b66afd
Merge branch 'main' into pep750-post-sprint-update
davepeck Oct 21, 2024
5401b48
Clarify template and interpolation equality and mutability.
davepeck Oct 21, 2024
e2ab4f7
Clarify 'shallow immutable'.
davepeck Oct 21, 2024
ef9471d
Explicitly mention ordering.
davepeck Oct 21, 2024
67eca55
Add "support" for "unsuitable for certain use cases".
davepeck Oct 21, 2024
c7af6ab
Introduce `templatelib`, a new top-level standard library module.
davepeck Oct 21, 2024
0534dba
Fix use of lambda in t-string (use parens)
davepeck Oct 21, 2024
51c258a
Add a new Post-History link.
davepeck Oct 21, 2024
0830574
I am apparently unable to do headers correctly on the first go.
davepeck Oct 21, 2024
45a5cd6
Clarify an important detail of `Template.__init__()`.
davepeck Oct 21, 2024
feee2d1
Merge branch 'main' into pep750-post-sprint-update
davepeck Oct 21, 2024
f45519f
Update peps/pep-0750.rst
davepeck Oct 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading