Re: [Python-Dev] r86351 - python/branches/py3k/Lib/tempfile.py

On Tue, 9 Nov 2010 04:43:58 +0100 (CET) raymond.hettinger <python-checkins@python.org> wrote:
Author: raymond.hettinger Date: Tue Nov 9 04:43:58 2010 New Revision: 86351
Log: Simplify code
Modified: python/branches/py3k/Lib/tempfile.py
Modified: python/branches/py3k/Lib/tempfile.py ============================================================================== --- python/branches/py3k/Lib/tempfile.py (original) +++ python/branches/py3k/Lib/tempfile.py Tue Nov 9 04:43:58 2010 @@ -108,30 +108,19 @@
_RandomNameSequence is an iterator."""
- characters = ("abcdefghijklmnopqrstuvwxyz" + - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + - "0123456789_") + characters = "abcdefghijklmnopqrstuvwxyz0123456789_"
Aren't you reducing entropy here?

On Tue, Nov 9, 2010 at 10:00 PM, Antoine Pitrou <solipsis@pitrou.net> wrote:
- characters = ("abcdefghijklmnopqrstuvwxyz" + - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + - "0123456789_") + characters = "abcdefghijklmnopqrstuvwxyz0123456789_"
Aren't you reducing entropy here?
Perhaps in some cases, but it also makes the behaviour consistent across all platforms. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
participants (2)
-
Antoine Pitrou
-
Nick Coghlan