This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients eric.smith, rowan.bradley, tim.peters
Date 2021-03-24.19:30:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1616614200.54.0.856420918613.issue43618@roundup.psfhosted.org>
In-reply-to
Content
Are you sure it's "a list"? At least print out `type(questions_element)`. `random.shuffle()` doesn't contain any code _capable_ of changing a list's length. It only does indexed accessing of the list:

...
    for i in reversed(range(1, len(x))):
        # pick an element in x[:i+1] with which to exchange x[i]
        j = randbelow(i + 1)
        x[i], x[j] = x[j], x[i]

That's about all there is to it. Note that, for this purpose, it doesn't matter want `randbelow()` does, because that function never even sees `x`.
History
Date User Action Args
2021-03-24 19:30:00tim.peterssetrecipients: + tim.peters, eric.smith, rowan.bradley
2021-03-24 19:30:00tim.peterssetmessageid: <1616614200.54.0.856420918613.issue43618@roundup.psfhosted.org>
2021-03-24 19:30:00tim.peterslinkissue43618 messages
2021-03-24 19:30:00tim.peterscreate