New submission from Philip Rowlands <pythonb...@dimebar.com>:
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. ---------- messages: 319867 nosy: philiprowlands priority: normal severity: normal status: open title: tempfile.tempdir cannot be unset type: crash _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33894> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com