[issue38351] Modernize email example from %-formatting to f-string

2019-11-15 Thread Tal Einat
Tal Einat added the comment: Thanks for the PR, Andrey! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38351] Modernize email example from %-formatting to f-string

2019-11-15 Thread miss-islington
miss-islington added the comment: New changeset fe67a5354010f33128c4f461da8ffb925e0f4de8 by Miss Islington (bot) in branch '3.7': bpo-38351: Modernize email examples from %-formatting to f-strings (GH-17162) https://github.com/python/cpython/commit/fe67a5354010f33128c4f461da8ffb925e0f4de8 -

[issue38351] Modernize email example from %-formatting to f-string

2019-11-15 Thread miss-islington
miss-islington added the comment: New changeset dae27cc8e72106c2eceeff9af83d1e58b2bb68d5 by Miss Islington (bot) in branch '3.8': bpo-38351: Modernize email examples from %-formatting to f-strings (GH-17162) https://github.com/python/cpython/commit/dae27cc8e72106c2eceeff9af83d1e58b2bb68d5 -

[issue38351] Modernize email example from %-formatting to f-string

2019-11-15 Thread miss-islington
Change by miss-islington : -- pull_requests: +16677 pull_request: https://github.com/python/cpython/pull/17168 ___ Python tracker ___ __

[issue38351] Modernize email example from %-formatting to f-string

2019-11-15 Thread miss-islington
Change by miss-islington : -- pull_requests: +16676 pull_request: https://github.com/python/cpython/pull/17167 ___ Python tracker ___ __

[issue38351] Modernize email example from %-formatting to f-string

2019-11-15 Thread Tal Einat
Tal Einat added the comment: New changeset e8acc865a3f112b98417f676c897ca6ec2dac2c7 by Tal Einat (Andrey Doroschenko) in branch 'master': bpo-38351: Modernize email examples from %-formatting to f-strings (GH-17162) https://github.com/python/cpython/commit/e8acc865a3f112b98417f676c897ca6ec2da

[issue38351] Modernize email example from %-formatting to f-string

2019-11-14 Thread Andrei Daraschenka
Change by Andrei Daraschenka : -- keywords: +patch pull_requests: +16672 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17162 ___ Python tracker __

[issue38351] Modernize email example from %-formatting to f-string

2019-11-14 Thread Fred Drake
Fred Drake added the comment: Thanks, Julien! Sounds good to me; no reason for a PR addressing this specific issue to be held up once one becomes available. -- ___ Python tracker __

[issue38351] Modernize email example from %-formatting to f-string

2019-11-14 Thread Julien Palard
Julien Palard added the comment: So, for newcomers finding this via "easy issues", go for it, you can fix this one :) On the different subjects discussed: # Mass-edit the stdlib We all agree that we should not mass-edit stdlib, (yet upgrading %-formatting to a newer syntax when modifying t

[issue38351] Modernize email example from %-formatting to f-string

2019-10-27 Thread Lewis Gaul
Lewis Gaul added the comment: Hi all, I'm a newcomer interested in making this small fix, but it looks like this has become a bit of a contentious issue. Are there any advances on whether this is a desirable fix? -- nosy: +Lewis Gaul ___ Python tr

[issue38351] Modernize email example from %-formatting to f-string

2019-10-09 Thread Mariatta
Mariatta added the comment: No decision yet. We're waiting for Julien's input. Thanks. -- ___ Python tracker ___ ___ Python-bugs-li

[issue38351] Modernize email example from %-formatting to f-string

2019-10-09 Thread Ido Michael
Ido Michael added the comment: So what was decided? I can fix this issue and I can wait for a final conclusion as it wasn't clear from the thread. -- nosy: +Ido Michael ___ Python tracker _

[issue38351] Modernize email example from %-formatting to f-string

2019-10-02 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: I'd like to see consistent usage by default, with specific examples using the older forms as appropriate. The use cases Raymond identified are worth discussing (and the tutorial may be a good place for this), and well as mentioned in the reference docs

[issue38351] Modernize email example from %-formatting to f-string

2019-10-02 Thread Kyle Stanley
Kyle Stanley added the comment: > For the most part, templating examples can be switched to the .format() style > but shouldn't be switched to f-strings. Is there no specific use case for the older "%s" % sub template that .format() doesn't have? > The former technique is still necessary if

[issue38351] Modernize email example from %-formatting to f-string

2019-10-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: > (Not that I can think of others off the top of my head.) For the most part, templating examples can be switched to the .format() style but shouldn't be switched to f-strings. The former technique is still necessary if someone wants to move templates t

[issue38351] Modernize email example from %-formatting to f-string

2019-10-02 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: Definitely agree with Eric on this; code modernization is definitely on the risky side, so judicious updates are important. (Of course, not updating is also a risk, eventually. But not much of one in this case.) This issue is really about whether the doc

[issue38351] Modernize email example from %-formatting to f-string

2019-10-02 Thread Eric V. Smith
Eric V. Smith added the comment: >> I definitely think we should not modify any code in the stdlib just to >> switch to f-strings. > Does this also apply to updating code to use f-strings in an area that's > already being modified for a functional purpose? No. As I said, not just to switch

[issue38351] Modernize email example from %-formatting to f-string

2019-10-02 Thread Kyle Stanley
Kyle Stanley added the comment: > I definitely think we should not modify any code in the stdlib just to switch > to f-strings. Does this also apply to updating code to use f-strings in an area that's already being modified for a functional purpose? I agree that that we shouldn't update st

[issue38351] Modernize email example from %-formatting to f-string

2019-10-02 Thread Eric V. Smith
Eric V. Smith added the comment: I definitely think we should not modify any code in the stdlib just to switch to f-strings. I think the code examples in the docs would benefit from a consistent style, and since f-strings are the least verbose way to format strings, I'd endorse using them e

[issue38351] Modernize email example from %-formatting to f-string

2019-10-02 Thread Kyle Stanley
Kyle Stanley added the comment: > so it would be a good candidate for the "newcomer friendly" label Never mind, just noticed this was already labeled as newcomer friendly. I only saw the "easy" label at first. (: If consensus is reached for this, we can open a separate issue for addressing

[issue38351] Modernize email example from %-formatting to f-string

2019-10-02 Thread Kyle Stanley
Kyle Stanley added the comment: Welcome back from the OOOS break Mariatta! > My question (and it's just that) is whether we've made a decision to prefer > one formatting syntax over others (outside of examples discussing the > formatting approaches themselves). I agree that we should reach

[issue38351] Modernize email example from %-formatting to f-string

2019-10-02 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: I agree that it's less invasive and easier to review. My question (and it's just that) is whether we've made a decision to prefer one formatting syntax over others (outside of examples discussing the formatting approaches themselves). If a decision is m

[issue38351] Modernize email example from %-formatting to f-string

2019-10-02 Thread Mariatta
Mariatta added the comment: I think updating one isolated code example is less invasive and easier to review, instead of one big PR to change everything from "%s" to str.format or f-string. I brought up this example code merely because I happen to be reading this page. -- _

[issue38351] Modernize email example from %-formatting to f-string

2019-10-02 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: Does it make sense to change just one example? I'm not sure what the long-term stance is on whether %-formatting should be replaced at this point, but shouldn't this be a matter of which string formatting approach we want overall, rather than adjusting o

[issue38351] Modernize email example from %-formatting to f-string

2019-10-02 Thread Mariatta
New submission from Mariatta : A string was formatted with %s in the code example https://github.com/python/cpython/blob/b3e7045f8314e7b62cd95861d207fe2f97e47198/Doc/includes/email-simple.py#L15 ``` msg['Subject'] = 'The contents of %s' % textfile ``` It would be great to modernize that in