pyformat.info
pyformat.info copied to clipboard
PEP 0498: f-Strings
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.
Thanks for the reminder. We are aware of it and will have to think how best to integrate it into the current structure.
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.
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 @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 ;)
You should prioritize this or add a warning to the page, as it stands now the site is quickly becoming misinformation.
@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...
Should be straightforward to add a notice that the page is outdated, even in your spare time.
Calling it outdated just because one feature of the very latest language release is missing would be quite an exaggeration.
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.
Python 3.6 has been the latest stable version of Python for 7 months now, it's not like this is an experimental feature.
Ok you've made your point. We'll get to it when we do. Thanks for your participation.