[Python-checkins] peps: Typos.
eric.smith
python-checkins at python.org
Mon Aug 24 14:46:04 CEST 2015
https://hg.python.org/peps/rev/12fdcb0b3548
changeset: 5983:12fdcb0b3548
user: Eric V. Smith <eric at trueblade.com>
date: Mon Aug 24 08:00:49 2015 -0400
summary:
Typos.
files:
pep-0498.txt | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/pep-0498.txt b/pep-0498.txt
--- a/pep-0498.txt
+++ b/pep-0498.txt
@@ -309,7 +309,7 @@
SyntaxError: invalid syntax
But note that this works, since the newline is removed from the
-string, and the spaces in from of the '1' are allowed in an
+string, and the spaces in front of the '1' are allowed in an
expression::
>>> f'{x+\
@@ -325,7 +325,7 @@
>>> width = 10
>>> precision = 4
>>> value = decimal.Decimal('12.34567')
- >>> f'result: {value:{width}.{prevision}}'
+ >>> f'result: {value:{width}.{precision}}'
'result: 12.35'
Once expressions in a format specifier are evaluated (if necessary),
@@ -467,7 +467,7 @@
While $identifier is no doubt more familiar to shell scripters and
users of some other languages, in Python str.format() is heavily
used. A quick search of Python's standard library shows only a handful
-of uses of string.Template, but over 1000 uses of str.format().
+of uses of string.Template, but hundreds of uses of str.format().
Another proposed alternative was to have the substituted text between
\{ and } or between \{ and \}. While this syntax would probably be
@@ -483,7 +483,7 @@
only single identifiers, or a limited subset of Python expressions
(such as the subset supported by str.format()). This PEP supports full
Python expressions inside the braces. Without full expressions, some
-desirable usage would be forbidden::
+desirable usage would be cumbersome. For example::
>>> f'Column={col_idx+1}'
>>> f'number of items: {len(items)}'
@@ -618,8 +618,8 @@
>>> f'{(lambda x: x*2)(3)}'
'6'
-Future extensions:
-==================
+Future extensions
+=================
By using another leading character (say, 'i'), we could extend this
proposal to cover internationalization and localization. The idea is
--
Repository URL: https://hg.python.org/peps
More information about the Python-checkins
mailing list