Issue 16432: Template strings documentation in Python 3 refers to % substitution in present tense (original) (raw)

Created on 2012-11-07 21:28 by andrewsg, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg175123 - (view) Author: Andrew Gorcester (andrewsg) * Date: 2012-11-07 21:28
Documentation here: http://docs.python.org/3/library/string.html#template-strings says "Instead of the normal %-based substitutions, Templates support $-based substitutions..." I believe it is confusing to refer to %-based substitutions in a way that implies they still exist in Python 3. It would be better to fix this to either refer to {} substitution or to remove the reference comparing it to normal string substitution altogether.
msg175125 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2012-11-07 21:59
Who said % substitution doesn't exist anymore in Python 3? That said, it's certainly not wrong to replace this with {} substitution.
msg175126 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2012-11-07 22:08
There is not a bug. %-based substitutions exist in Python 3. http://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting
msg175132 - (view) Author: Andrew Gorcester (andrewsg) * Date: 2012-11-08 00:41
Sorry, my mistake -- I thought that %-based formatting had been deprecated and removed by now, because it wasn't documented in library/string.html . However, I still think referring to %-based formatting as "normal" in Python 3 is confusing to readers as it is not the preferred system.
msg181034 - (view) Author: Ramchandra Apte (Ramchandra Apte) * Date: 2013-01-31 16:02
> ... as it is not the preferred system. I prefer .format() but I don't think that's true for many people.
History
Date User Action Args
2022-04-11 14:57:38 admin set github: 60636
2013-04-06 00:24:45 andrewsg set status: open -> closedresolution: wont fix
2013-01-31 16:02:17 Ramchandra Apte set nosy: + Ramchandra Aptemessages: +
2012-11-08 00:41:57 andrewsg set messages: +
2012-11-07 22:08:17 serhiy.storchaka set nosy: + serhiy.storchakamessages: +
2012-11-07 21:59:35 georg.brandl set nosy: + georg.brandlmessages: +
2012-11-07 21:28:24 andrewsg create