Message319867
Quoting https://docs.python.org/3/library/tempfile.html
"""
tempfile.tempdir
When set to a value other than None, this variable defines the default value for the dir argument to the functions defined in this module.
If tempdir is unset or None at any call to any of the above functions except gettempprefix() it is initialized following the algorithm described in gettempdir().
"""
"If tempdir is unset ..." is not true:
$ python3 -c 'import tempfile; del tempfile.tempdir; t = tempfile.mkdtemp()'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.2/tempfile.py", line 298, in mkdtemp
dir = gettempdir()
File "/usr/lib/python3.2/tempfile.py", line 238, in gettempdir
if tempdir is None:
NameError: global name 'tempdir' is not defined
No strong preference whether the docs change to match the implementation, or vice-versa. |
|
Date |
User |
Action |
Args |
2018-06-18 07:34:43 | philiprowlands | set | recipients:
+ philiprowlands |
2018-06-18 07:34:43 | philiprowlands | set | messageid: <1529307283.94.0.56676864532.issue33894@psf.upfronthosting.co.za> |
2018-06-18 07:34:43 | philiprowlands | link | issue33894 messages |
2018-06-18 07:34:43 | philiprowlands | create | |
|