A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-December/151392.html below:

[Python-Dev] f-strings

[Python-Dev] f-stringsStephen J. Turnbull turnbull.stephen.fw at u.tsukuba.ac.jp
Tue Dec 19 11:47:28 EST 2017
Mariatta Wijaya writes:
 > I agree it's useful info :)
 > 
 > I went ahead and made a PR [1].
 > In my PR, I simply linked to the Format Specification Mini Language[2] from
 > f-strings documentation[3].
 > 
 > Not sure about updating PEP 498 at this point..

I don't see any reason not to document tips and tricks with f-strings,
and this is a nice and useful example.  But it looks like TOOWTDI to
me.  The syntax is documented (6.1.3.1 in the Library Reference),
along with a specific relevant example ("Aligning the text and
specifying a width" in 6.1.3.2).

So -1 on putting the recipe in the reference docs.  I really don't
think this kind of information belongs in a PEP for sure, and probably
not even in the Library Reference.  The Tutorial might be a good place
for it, though.

If I were Bach, I'd compose a more-itertools-like module to be named
Variations_on_the_F_String. :-)

Steve

More information about the Python-Dev mailing list

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