[Python-checkins] r54277 - sandbox/trunk/pep3101/proposed-pep-changes.txt
patrick.maupin
python-checkins at python.org
Mon Mar 12 01:18:27 CET 2007
Author: patrick.maupin
Date: Mon Mar 12 01:18:26 2007
New Revision: 54277
Modified:
sandbox/trunk/pep3101/proposed-pep-changes.txt
Log:
Corrected a few typos
Modified: sandbox/trunk/pep3101/proposed-pep-changes.txt
==============================================================================
--- sandbox/trunk/pep3101/proposed-pep-changes.txt (original)
+++ sandbox/trunk/pep3101/proposed-pep-changes.txt Mon Mar 12 01:18:26 2007
@@ -113,12 +113,12 @@
Two keyword argument names are reserved for use by the format
method:
- The namespace argument, if present, should be bound to a
+ The 'namespace' argument, if present, should be bound to a
dictionary or tuple of dictionaries, which will be searched
whenevar a keyword argument is not found in the **kwargs
passed to format().
- The field_hook argument, if present, defines a "hook" callback
+ The 'field_hook' argument, if present, defines a "hook" callback
function which allows greater user control over the formatting
operation.
@@ -138,11 +138,11 @@
string/unicode format method. In other words, the
output from:
- str.format(some_string, *args, **kwargs)
+ str.format(format_string, *args, **kwargs)
and:
- string.format(some_string, *args, **kwargs)
+ string.format(format_string, *args, **kwargs)
will be indentical.
@@ -151,7 +151,7 @@
The flag_format function adds an integer flags
argument in front of the parameters which are
passed to the format method. If this flags parameter
- is 0, the results of calling flags_format will be
+ is 0, the results of calling flag_format will be
identical to the results of calling format with the
same string and *args and **kwargs. Setting bits
in the flags parameter allows finer control over
@@ -184,13 +184,13 @@
FORMAT_ALLOW_LEADING_UNDERSCORES
By default, leading underscores are not allowed in identifier
- lookups (getattr or setattr). Setting this flag will allow this.
+ lookups (getattr or getitem). Setting this flag will allow this.
FORMAT_USE_ALL_ARGUMENTS
By default, the formatting engine does not check that all
arguments passed to it are used by the format string. If
- this flag is set, an exception will be thrown if some
+ this flag is set, an exception will be raised if some
arguments are unused.
Backporting to earlier versions of Python
@@ -768,10 +768,11 @@
Argument name collisions
- The 'namespace' and 'field_hook' arguments to format share the
- same namespace as the user's field names. There is nothing
- which keeps a format string which does not require the namespace
- or field_hook from reusing these names for its own variables.
+ The 'namespace' and 'field_hook' arguments to format() share the
+ same namespace as the user's keyword argument field names. There
+ is nothing to prevent a format string which does not require the
+ 'namespace' or 'field_hook' arguments from reusing these names
+ for its own variables.
For clarity, use of names with leading underscores, like
_namespace and _field_hook, was considered and rejected, because
@@ -783,7 +784,7 @@
Automatic inclusion of locals() and globals()
If no parameters are passed to the format() method, it will
- automatically user the caller's locals() and globals().
+ automatically use the caller's locals() and globals().
It is a tough call as to whether this should be done or not;
on the one hand it is awfully convenient, but on the other
hand it may be considered to violate the EIBTI principle. If
More information about the Python-checkins
mailing list