Re: on str.format and f-strings

2022-09-06 Thread Meredith Montgomery
Chris Angelico writes: > On Wed, 7 Sept 2022 at 03:52, Meredith Montgomery > wrote: >> >> It seems to me that str.format is not completely made obsolete by the >> f-strings that appeared in Python 3.6. But I'm not thinking that this >> was the objective of the introduction of f-strings: the PE

Re: on str.format and f-strings

2022-09-06 Thread Chris Angelico
On Wed, 7 Sept 2022 at 03:52, Meredith Montgomery wrote: > > It seems to me that str.format is not completely made obsolete by the > f-strings that appeared in Python 3.6. But I'm not thinking that this > was the objective of the introduction of f-strings: the PEP at > > https://peps.python.org

Re: on str.format and f-strings

2022-09-06 Thread Meredith Montgomery
Julio Di Egidio writes: > On Tuesday, 6 September 2022 at 01:03:02 UTC+2, Meredith Montgomery wrote: >> Julio Di Egidio writes: >> > On Monday, 5 September 2022 at 22:18:58 UTC+2, Meredith Montgomery wrote: >> >> r...@zedat.fu-berlin.de (Stefan Ram) writes: >> > >> >> > , but with the spaces

Re: on str.format and f-strings

2022-09-06 Thread Meredith Montgomery
Julio Di Egidio writes: > On Monday, 5 September 2022 at 22:18:58 UTC+2, Meredith Montgomery wrote: >> r...@zedat.fu-berlin.de (Stefan Ram) writes: > >> > , but with the spaces removed, it's even one character >> > shorter than the format expression: >> > >> > eval('f"The name is {name} and t

Re: on str.format and f-strings

2022-09-06 Thread Meredith Montgomery
r...@zedat.fu-berlin.de (Stefan Ram) writes: > Meredith Montgomery writes: > ... >> d = { "name": "Meredith", "email": "mmontgom...@levado.to" } >> return "The name is {name} and the email is {email}".format(**d) >>--8<---cut here---end--->8--- >>Is there a w

on str.format and f-strings

2022-09-06 Thread Meredith Montgomery
It seems to me that str.format is not completely made obsolete by the f-strings that appeared in Python 3.6. But I'm not thinking that this was the objective of the introduction of f-strings: the PEP at https://peps.python.org/pep-0498/#id11 says so explicitly. My question is whether f-strin