<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">If so, then I would suggest than each
      list provides a .shuffle method as well (just as sorted/sort
      does).<br>
      <br>
      <br>
      On 06.09.2016 06:34, Mahmoud Hashemi wrote:<br>
    </div>
    <blockquote
cite="mid:CALXjU9GQOY7uOidpaUgLxA=WmGHHNYVUHNaCn56u_0TJOsS4Jw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>I tend to agree with Arek. I've been bitten multiple
              times, including once yesterday, because shuffle works in
              place, when I really expect a sorted()-like behavior for a
              standalone function like that.<br>
              <br>
            </div>
            Mahmoud<br>
          </div>
          <a moz-do-not-send="true" href="https://github.com/mahmoud">https://github.com/mahmoud</a><br>
        </div>
        <a moz-do-not-send="true" href="http://sedimental.org">http://sedimental.org</a><br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Mon, Sep 5, 2016 at 6:59 PM, Arek
          Bulski <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:arek.bulski@gmail.com" target="_blank">arek.bulski@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">
              <div class="gmail_default" style="font-family:trebuchet
                ms,sans-serif">shuffled() should be in the random
                module, of course. I dont suggest a builtin. Although
                now that you mentioned it, I could go for that too.</div>
              <div class="gmail_default" style="font-family:trebuchet
                ms,sans-serif"><br>
              </div>
              <div class="gmail_default" style="font-family:trebuchet
                ms,sans-serif">There are usage cases where its heavily
                used, in randomized testing for example. I am sure that
                there are also other domains where randomization of
                lists is used. </div>
              <div class="gmail_default" style="font-family:trebuchet
                ms,sans-serif"><br>
              </div>
              <div class="gmail_default" style="font-family:trebuchet
                ms,sans-serif">Another reason to put it there is that
                using shuffle is inconvenient. The fact that I CAN write
                it myself doesnt mean that it doesnt belong in the
                standard library.</div>
              <div class="gmail_default" style="font-family:trebuchet
                ms,sans-serif"><br>
              </div>
              <div class="gmail_default" style="font-family:trebuchet
                ms,sans-serif">Implementing this in pure python wont
                take a lot of work.</div>
              <div class="gmail_default" style="font-family:trebuchet
                ms,sans-serif"><br>
              </div>
              <div>
                <div data-smartmail="gmail_signature">
                  <div dir="ltr">
                    <div>
                      <div dir="ltr">
                        <div>
                          <div>
                            <div><font face="'trebuchet ms', sans-serif">pozdrawiam,</font></div>
                            <div><font face="'trebuchet ms', sans-serif">Arkadiusz
                                Bulski</font></div>
                            <br>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <br>
            ______________________________<wbr>_________________<br>
            Python-ideas mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
            <a moz-do-not-send="true"
              href="https://mail.python.org/mailman/listinfo/python-ideas"
              rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-ideas</a><br>
            Code of Conduct: <a moz-do-not-send="true"
              href="http://python.org/psf/codeofconduct/"
              rel="noreferrer" target="_blank">http://python.org/psf/<wbr>codeofconduct/</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Python-ideas mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Python-ideas@python.org">Python-ideas@python.org</a>
<a class="moz-txt-link-freetext" href="https://mail.python.org/mailman/listinfo/python-ideas">https://mail.python.org/mailman/listinfo/python-ideas</a>
Code of Conduct: <a class="moz-txt-link-freetext" href="http://python.org/psf/codeofconduct/">http://python.org/psf/codeofconduct/</a></pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>