diff options
Diffstat (limited to 'Lib/tempfile.py')
| -rw-r--r-- | Lib/tempfile.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/tempfile.py b/Lib/tempfile.py index 770f72c252..c3fe61aa0a 100644 --- a/Lib/tempfile.py +++ b/Lib/tempfile.py @@ -143,10 +143,7 @@ class _RandomNameSequence: return self def __next__(self): - c = self.characters - choose = self.rng.choice - letters = [choose(c) for dummy in range(8)] - return ''.join(letters) + return ''.join(self.rng.choices(self.characters, k=8)) def _candidate_tempdir_list(): """Generate a list of candidate temporary directories which |
