[issue32263] Template string docs refer to "normal %-based substitutions"
New submission from Glenn Linderman <v+python@g.nevcal.com>: At least as far back as Python 3.1, the description for Template strings (section 6.1.5 in version 3.6.4rc1 docs) starts by differentiating what Template strings do, as: Instead of the normal %-based substitutions, Templates support $-based substitutions, using the following rules: Since this immediately follows a section describing the "Custom String Formatting" and the "Format Specification Mini-Language", which does a type of substitutions that is {} based, rather than % based, it is hard to grasp exactly why %-based substitutions would be considered "normal". Of course, I know why, due to the % operator, but for someone just reading through chapter 6, it is a reference that raises the mental question "Huh? What is normal %-based substitution? Are Templates abnormal, if %-based substitutions are normal? What did I miss? The previous section was about {}-based substitutions? Are they abnormal, too? What are normal %-based substitutions, anyway?" rather than helping to describe what Templates are and do. ---------- assignee: docs@python components: Documentation messages: 307922 nosy: docs@python, v+python priority: normal severity: normal status: open title: Template string docs refer to "normal %-based substitutions" versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32263> _______________________________________
Change by Barry A. Warsaw <barry@python.org>: ---------- nosy: +barry _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32263> _______________________________________
Raymond Hettinger <raymond.hettinger@gmail.com> added the comment: We can remove the word "normal" but otherwise the docs read fairly well. FWIW, when there docs were written, the {} new-style string formatting didn't exist, so the wording was reasonable at the time. ---------- assignee: docs@python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32263> _______________________________________
Barry A. Warsaw <barry@python.org> added the comment: On Dec 10, 2017, at 14:36, Raymond Hettinger <report@bugs.python.org> wrote:
Raymond Hettinger <raymond.hettinger@gmail.com> added the comment:
We can remove the word "normal" but otherwise the docs read fairly well.
+1
FWIW, when there docs were written, the {} new-style string formatting didn't exist, so the wording was reasonable at the time.
Exactly. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32263> _______________________________________
Raymond Hettinger <raymond.hettinger@gmail.com> added the comment: FWIW, this was already fixed in the 3.7 docs. I don't feel any real need to backport it. ---------- assignee: rhettinger -> _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32263> _______________________________________
Change by Raymond Hettinger <raymond.hettinger@gmail.com>: ---------- versions: -Python 3.4, Python 3.5, Python 3.7, Python 3.8 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32263> _______________________________________
Terry J. Reedy <tjreedy@udel.edu> added the comment: https://github.com/python/cpython/commit/9f74deba784fc8781d13ed564f69c02ed7c... merged by Warsaw (last March). It removed the whole phrase, "Instead of the normal %-based substitutions," I think the other changes would be more worth backporting, (assuming correct for 3.6, which I believe they are) if anything is. ---------- nosy: +terry.reedy _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32263> _______________________________________
participants (4)
-
Barry A. Warsaw -
Glenn Linderman -
Raymond Hettinger -
Terry J. Reedy