[issue16432] Template strings documentation in Python 3 refers to % substitution in present tense

New submission from Andrew Gorcester: 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. ---------- assignee: docs@python components: Documentation messages: 175123 nosy: andrewsg, docs@python priority: normal severity: normal status: open title: Template strings documentation in Python 3 refers to % substitution in present tense versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16432> _______________________________________

Georg Brandl added the comment: Who said % substitution doesn't exist anymore in Python 3? That said, it's certainly not wrong to replace this with {} substitution. ---------- nosy: +georg.brandl _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16432> _______________________________________

Serhiy Storchaka added the comment: There is not a bug. %-based substitutions exist in Python 3. http://docs.python.org/3/library/stdtypes.html#printf-style-string-formattin... ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16432> _______________________________________

Andrew Gorcester added the comment: 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. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16432> _______________________________________

Ramchandra Apte added the comment:
... as it is not the preferred system. I prefer .format() but I don't think that's true for many people.
---------- nosy: +ramchandra.apte _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16432> _______________________________________

Changes by Andrew Gorcester <andrew.gorcester@gmail.com>: ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16432> _______________________________________

Georg Brandl added the comment: Who said % substitution doesn't exist anymore in Python 3? That said, it's certainly not wrong to replace this with {} substitution. ---------- nosy: +georg.brandl _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16432> _______________________________________

Serhiy Storchaka added the comment: There is not a bug. %-based substitutions exist in Python 3. http://docs.python.org/3/library/stdtypes.html#printf-style-string-formattin... ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16432> _______________________________________

Andrew Gorcester added the comment: 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. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16432> _______________________________________

Ramchandra Apte added the comment:
... as it is not the preferred system. I prefer .format() but I don't think that's true for many people.
---------- nosy: +ramchandra.apte _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16432> _______________________________________

Changes by Andrew Gorcester <andrew.gorcester@gmail.com>: ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16432> _______________________________________
participants (4)
-
Andrew Gorcester
-
Georg Brandl
-
Ramchandra Apte
-
Serhiy Storchaka