mirror of
https://https.git.savannah.gnu.org/git/gettext.git
synced 2026-01-26 15:39:11 +00:00
python-format: Accept null precision.
Proof that it's valid:
$ python
print("%(value).f" % { 'value': 3.1415926535 })
* gettext-tools/src/format-python.c: Fix comment regarding the precision.
* gettext-tools/tests/format-python-1: Add a test case with null precision.
This commit is contained in:
parent
c0a5ed0180
commit
b6ea1c2cbe
@ -50,7 +50,7 @@
|
||||
- is optionally followed by a width specification: '*' (reads an argument)
|
||||
or a nonempty digit sequence,
|
||||
- is optionally followed by '.' and a precision specification: '*' (reads
|
||||
an argument) or a nonempty digit sequence,
|
||||
an argument) or an optional nonempty digit sequence,
|
||||
- is optionally followed by a size specifier, one of 'h' 'l' 'L'.
|
||||
- is finished by a specifier
|
||||
- '%', that needs no argument,
|
||||
|
||||
@ -64,6 +64,8 @@ cat <<\EOF > f-p-1.data
|
||||
"abc%y"
|
||||
# Invalid: flags after width
|
||||
"abc%*0g"
|
||||
# Valid: null precision
|
||||
"abc%.f"
|
||||
# Invalid: twice precision
|
||||
"abc%.4.2g"
|
||||
# Invalid: two size specifiers
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user