This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaajemyfren
Recipients amaajemyfren, docs@python, eric.smith, ezio.melotti, gvanrossum
Date 2020-07-30.05:12:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>

Thanks Ezio for the detailed response.

> In the list of proposed solutions in my first message, 1-3 should be quite easy to implement.  This leaves us with 4-5.

To the best of my seeing there are only two places in the documentation that have information about f-strings. The tutorial[0] and the reference[1]
I have done PR 21681 that adds index to the tutorial although searching[2][3] does not seem to be better now that the reference has an index.

> The lexical analysis is probably fine as is.
I agree.

> The introduction in the tutorial should mention f-strings ....

This is there[0] but it _IS_ hard to find, when you don't know it is there.
It may not be very "introduction-y", and if you like I can make a go at trying to reword it.

> The stdtypes page is already quite long and crowded ...

True. But is this wrong? In my feeling this is reference documentation. It should be accurate, complete and clear. It may not need to be "textbook-like".

Some thoughts:
- There may be benefit in reorganising stdtypes.rst to improve the flow without changing the actual content. This could mean breaking it up into a number of documents rather than the monolith it is.
- It does feel like printf[4] was plugged in later because str.format()[5] had been explained earlier. (Although I believe printf came before str.format()). A first time reader of the document will find it hard to know the one way that is right when it comes to formatting.
- f-strings should probably also be described here because it _is_ built in, no? It may not be accurate to say it is in /Lib/strings. There is no reference that a developer can just look at to remind/confirm to themselves how to "do it".

> So, unless we add a separate page somewhere

This is why I was thinking of a HOWTO. Going back to your original pain in msg371912, someone wanted the f-string documentation and:
-- It was hard to find. (indexing? better table of contents?)
-- It was not very helpful WHEN it was found. (A second entry with f-strings in Lib that is easier for a dev to use?)

But now (and this is mainly to me) it appears that another problem is a need to consistently, clearly, and in one place describe the various elements/nuances/eccentricities of presenting data in Python: 
  - string
  - string.Formatter,
  - string.Template,
  - str.format()
  - f-string
  - Format Specification Mini-Language
  - maybe even __format__ and conversion?
  - etc

I propose one of the following two:
1) A new section in Library documentation just to handle strings, then systematically removing them elsewhere.(Built-In Functions, Built-In Types, Text Processing Services)
2) We take all that Python history and explain it in a HOWTO, and add a developer friendly reference in the Library for f-string. More like Logging Cookbook rather than Logging Howto.

!) above is similar to what you propose ... but different-ish.

Date User Action Args
2020-07-30 05:12:38amaajemyfrensetrecipients: + amaajemyfren, gvanrossum, eric.smith, ezio.melotti, docs@python
2020-07-30 05:12:38amaajemyfrensetmessageid: <>
2020-07-30 05:12:38amaajemyfrenlinkissue41411 messages
2020-07-30 05:12:37amaajemyfrencreate