]> granicus.if.org Git - python/commitdiff
Use designated syntax for optional grammar element.
authorGeorg Brandl <georg@python.org>
Sun, 27 Jun 2010 10:49:23 +0000 (10:49 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 27 Jun 2010 10:49:23 +0000 (10:49 +0000)
Doc/library/string.rst

index 731484813a071ec1587a9742ad68c74e24b7ca61..23414dd112b5b6bbec3359aa9d3145d58fabba01 100644 (file)
@@ -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 "]"> +