[Python-checkins] bpo-32720: Fixed the replacement field grammar documentation. (GH-5544)
Mariatta
webhook-mailer at python.org
Mon Feb 5 04:29:10 EST 2018
https://github.com/python/cpython/commit/7a561afd2c79f63a6008843b83733911d07f0119
commit: 7a561afd2c79f63a6008843b83733911d07f0119
branch: master
author: Mariatta <Mariatta at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-02-05T04:29:02-05:00
summary:
bpo-32720: Fixed the replacement field grammar documentation. (GH-5544)
`arg_name` and `element_index` are defined as `digit`+ instead of `integer`.
files:
M Doc/library/string.rst
diff --git a/Doc/library/string.rst b/Doc/library/string.rst
index 9b30f8fe1299..ee8ea857da4b 100644
--- a/Doc/library/string.rst
+++ b/Doc/library/string.rst
@@ -202,9 +202,9 @@ The grammar for a replacement field is as follows:
.. productionlist:: sf
replacement_field: "{" [`field_name`] ["!" `conversion`] [":" `format_spec`] "}"
field_name: arg_name ("." `attribute_name` | "[" `element_index` "]")*
- arg_name: [`identifier` | `integer`]
+ arg_name: [`identifier` | `digit`+]
attribute_name: `identifier`
- element_index: `integer` | `index_string`
+ element_index: `digit`+ | `index_string`
index_string: <any source character except "]"> +
conversion: "r" | "s" | "a"
format_spec: <described in the next section>
More information about the Python-checkins
mailing list