Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8ce5764

Browse files
committed
Update "Format String Syntax" documentation block to match actual behaviour
From discussion thread:https://discuss.python.org/t/format-string-syntax-specification-differs-from-actual-behaviour/46716/2
1 parente7c5f60 commit8ce5764

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎Doc/library/string.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ The grammar for a replacement field is as follows:
216216
..productionlist::format-string
217217
replacement_field: "{" [`field_name`] ["!" `conversion`] [":" `format_spec`] "}"
218218
field_name: `arg_name` ("." `attribute_name` | "[" `element_index` "]")*
219-
arg_name: [`~python-grammar:identifier` | `~python-grammar:digit`+]
220-
attribute_name:`~python-grammar:identifier`
219+
arg_name: [`~python-grammar:digit`+ | `attribute_name`]
220+
attribute_name:<any source character except "]" or "."> +
221221
element_index: `~python-grammar:digit`+ | `index_string`
222222
index_string: <any source character except "]"> +
223223
conversion: "r" | "s" | "a"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp