[Python-checkins] r84572 - python/branches/release27-maint/Lib/random.py

raymond.hettinger python-checkins at python.org
Tue Sep 7 00:54:24 CEST 2010


Author: raymond.hettinger
Date: Tue Sep  7 00:54:24 2010
New Revision: 84572

Log:
Remove outdated XXX comment.  Mapping support was removed for 3.x.

Modified:
   python/branches/release27-maint/Lib/random.py

Modified: python/branches/release27-maint/Lib/random.py
==============================================================================
--- python/branches/release27-maint/Lib/random.py	(original)
+++ python/branches/release27-maint/Lib/random.py	Tue Sep  7 00:54:24 2010
@@ -292,15 +292,6 @@
         large population:   sample(xrange(10000000), 60)
         """
 
-        # XXX Although the documentation says `population` is "a sequence",
-        # XXX attempts are made to cater to any iterable with a __len__
-        # XXX method.  This has had mixed success.  Examples from both
-        # XXX sides:  sets work fine, and should become officially supported;
-        # XXX dicts are much harder, and have failed in various subtle
-        # XXX ways across attempts.  Support for mapping types should probably
-        # XXX be dropped (and users should pass mapping.keys() or .values()
-        # XXX explicitly).
-
         # Sampling without replacement entails tracking either potential
         # selections (the pool) in a list or previous selections in a set.
 


More information about the Python-checkins mailing list