pyformat.info icon indicating copy to clipboard operation
pyformat.info copied to clipboard

PEP 0498: f-Strings

Open hut8 opened this issue 8 years ago • 11 comments

This got accepted a bit ago!

https://www.python.org/dev/peps/pep-0498/

It's for 3.6, so we have some time since that pre-release isn't out yet.

hut8 avatar Oct 04 '15 14:10 hut8

Thanks for the reminder. We are aware of it and will have to think how best to integrate it into the current structure.

ulope avatar Oct 04 '15 14:10 ulope

If we don't completely refactor the whole system, introducing a new _result variable and check should end up being pretty straight forward. We will just have to provide some additional documentation around that in order to prevent 1000 reports that something of that format isn't working for people trying it in Python 3.4, for instance.

zerok avatar Oct 06 '15 16:10 zerok

Would it be as "simple" as changing "old" to "python2", "new" to "python3", and adding "python3.6"?

Or could it be re-worded to be more explicit with the strategy names: "old" could stay the same or become "percent-formatted" "new" becomes "Format method" and "String literal" or "Format string" gets added?

Chris-May avatar Dec 12 '16 20:12 Chris-May

@Chris-May @ulope started working on a rewrite of the whole application using Lektor. This should allow us to become far more flexible here as every formatting will ideally get its own content block :) I'm not sure about a timeline but during the last week of December I definitely plan to help there a bit ;)

zerok avatar Dec 12 '16 20:12 zerok

You should prioritize this or add a warning to the page, as it stands now the site is quickly becoming misinformation.

ddevault avatar Jul 21 '17 17:07 ddevault

@SirCmpwn I'm quite aware that f-String documentation needs to be added. However we do this in our spare time. So we'll get to it when we can. Luckily Python 3.6 isn't very widely adopted yet...

ulope avatar Jul 24 '17 12:07 ulope

Should be straightforward to add a notice that the page is outdated, even in your spare time.

ddevault avatar Jul 24 '17 13:07 ddevault

Calling it outdated just because one feature of the very latest language release is missing would be quite an exaggeration.

ulope avatar Jul 24 '17 13:07 ulope

It's not an exaggeration, it's a fact. This document is literally outdated. The idiomatic way to format strings is now f-strings, and this document should be updated to reflect that and if not, at least should include a warning addressing it.

ddevault avatar Jul 24 '17 13:07 ddevault

Python 3.6 has been the latest stable version of Python for 7 months now, it's not like this is an experimental feature.

ddevault avatar Jul 24 '17 13:07 ddevault

Ok you've made your point. We'll get to it when we do. Thanks for your participation.

ulope avatar Jul 24 '17 13:07 ulope