#5761: Use random.sample, don't reimplement it
-----------------------------------------------+----------------------------
Reporter: Nir Soffer <[EMAIL PROTECTED]> | Owner: nobody
Status: new | Component: Contrib
apps
Version: SVN | Resolution:
Keywords: | Stage:
Accepted
Has_patch: 1 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
-----------------------------------------------+----------------------------
Changes (by mboersma):
* needs_better_patch: => 0
* component: Uncategorized => Contrib apps
* needs_tests: => 0
* summary: Minor refactoring => Use random.sample, don't reimplement it
* version: 0.96 => SVN
* needs_docs: => 0
* has_patch: 0 => 1
* stage: Unreviewed => Accepted
Old description:
> Use random.sample instead of re-implementing it :-)
New description:
Python's standard library since 2.3 has had random.sample for choosing
random elements of a sequence. In contrib/auth/models.py, the implementor
was unaware of this and wrote a bit more code than needed.
Comment:
I changed the title and description to be clearer, and updated it to
Django-SVN, since 0.96 won't get patched for this, and it's still there in
trunk.
--
Ticket URL: <http://code.djangoproject.com/ticket/5761#comment:1>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---