Kaydet (Commit) 3a420c75 authored tarafından R David Murray's avatar R David Murray

#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.
üst 8153b7a5
...@@ -25,7 +25,7 @@ instead a string of six random characters is used. ...@@ -25,7 +25,7 @@ instead a string of six random characters is used.
Also, all the user-callable functions now take additional arguments which Also, all the user-callable functions now take additional arguments which
allow direct control over the location and name of temporary files. It is 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 To maintain backward compatibility, the argument order is somewhat odd; it
is recommended to use keyword arguments for clarity. is recommended to use keyword arguments for clarity.
......
...@@ -10,8 +10,6 @@ This module also provides some data items to the user: ...@@ -10,8 +10,6 @@ This module also provides some data items to the user:
TMP_MAX - maximum number of names that will be tried before TMP_MAX - maximum number of names that will be tried before
giving up. 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 tempdir - If this is set to a string before the first use of
any routine from this module, it will be considered as any routine from this module, it will be considered as
another candidate location to store temporary files. another candidate location to store temporary files.
...@@ -74,6 +72,8 @@ if hasattr(_os, 'TMP_MAX'): ...@@ -74,6 +72,8 @@ if hasattr(_os, 'TMP_MAX'):
else: else:
TMP_MAX = 10000 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" template = "tmp"
# Internal routines. # Internal routines.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment