[Python-checkins] cpython: #10354: remove last public mentions of 'template' and comment as private.
r.david.murray
python-checkins at python.org
Thu Jun 23 03:01:49 CEST 2011
http://hg.python.org/cpython/rev/eafe8c7f7049
changeset: 70932:eafe8c7f7049
parent: 70930:93cd98782f47
user: R David Murray <rdmurray at bitdance.com>
date: Wed Jun 22 21:01:13 2011 -0400
summary:
#10354: remove last public mentions of 'template' and comment as private.
I didn't rename the variable because I can see no good reason
to break backward compatibility just to put an underscore in
the name.
files:
Doc/library/tempfile.rst | 2 +-
Lib/tempfile.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Doc/library/tempfile.rst b/Doc/library/tempfile.rst
--- a/Doc/library/tempfile.rst
+++ b/Doc/library/tempfile.rst
@@ -25,7 +25,7 @@
Also, all the user-callable functions now take additional arguments which
allow direct control over the location and name of temporary files. It is
-no longer necessary to use the global *tempdir* and *template* variables.
+no longer necessary to use the global *tempdir* variable.
To maintain backward compatibility, the argument order is somewhat odd; it
is recommended to use keyword arguments for clarity.
diff --git a/Lib/tempfile.py b/Lib/tempfile.py
--- a/Lib/tempfile.py
+++ b/Lib/tempfile.py
@@ -10,8 +10,6 @@
TMP_MAX - maximum number of names that will be tried before
giving up.
- template - the default prefix for all temporary names.
- You may change this to control the default prefix.
tempdir - If this is set to a string before the first use of
any routine from this module, it will be considered as
another candidate location to store temporary files.
@@ -74,6 +72,8 @@
else:
TMP_MAX = 10000
+# Although it does not have an underscore for historical reasons, this
+# variable is an internal implementation detail (see issue 10354).
template = "tmp"
# Internal routines.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list