summaryrefslogtreecommitdiffstats
path: root/Doc/library/string.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-06-27 10:49:23 (GMT)
committerGeorg Brandl <georg@python.org>2010-06-27 10:49:23 (GMT)
commit817d91829f388a0302254c71792bb6b5382fd273 (patch)
treea0011120f2c425d3ec730e81dc019655683211c7 /Doc/library/string.rst
parent565569b8dcddadb9ad1e5b8cc754119837777db7 (diff)
downloadcpython-817d91829f388a0302254c71792bb6b5382fd273.zip
cpython-817d91829f388a0302254c71792bb6b5382fd273.tar.gz
cpython-817d91829f388a0302254c71792bb6b5382fd273.tar.bz2
Use designated syntax for optional grammar element.
Diffstat (limited to 'Doc/library/string.rst')
-rw-r--r--Doc/library/string.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/string.rst b/Doc/library/string.rst
index 7314848..23414dd 100644
--- a/Doc/library/string.rst
+++ b/Doc/library/string.rst
@@ -224,7 +224,7 @@ 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` | `integer`]
attribute_name: `identifier`
element_index: `integer` | `index_string`
index_string: <any source character except "]"> +