<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 08.09.2016 00:41, Matt Gilson wrote:<br>
    </div>
    <blockquote
cite="mid:CAJCbRZbHKhfsgfNtpTDMDpOFTBFU5GY30g6u9_FCkU2K7=dhTA@mail.gmail.com"
      type="cite">
      <div dir="ltr">I lurk around here a lot more than I actually post
        -- But in this case I find myself weighing in firmly on the side
        of "please don't add this".  It'd just add noise in the
        documentation and __builtins__ namespace.  There are millions of
        useful functions that <i>could</i> be added to the `list`
        object (or to the `__builtins__` namespace).  It's the job of
        the core dev team to decide which are the most useful for
        everybody and this is one where (in my opinion) the usefulness
        doesn't justify the additional clutter.
        <div><br>
        </div>
        <div>It seems like the primary argument for this is that some
          users would like to have this functionality baked into an
          interactive session.</div>
      </div>
    </blockquote>
    <br>
    Maybe, it wasn't obvious (despite I thought so), but I also don't
    see it in the built-ins. Another function in the "random" module
    would just suffice.<br>
    <br>
    But still, this is not my proposal, so I am gonna wait for what Arek
    brings up.<br>
    <br>
    Sven<br>
    <br>
    <blockquote
cite="mid:CAJCbRZbHKhfsgfNtpTDMDpOFTBFU5GY30g6u9_FCkU2K7=dhTA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>If that's the case, then I'd like to point out that if you
          find yourself wanting this in an interactive session
          frequently <a moz-do-not-send="true"
href="https://docs.python.org/3/tutorial/appendix.html#the-interactive-startup-file">there
            is an interactive startup file</a> that you can modify so
          that this function will always be available to <i>you</i> whenever
          you start up an interactive session (and you can put whatever
          else in there that you like as well :-).</div>
      </div>
    </blockquote>
    <blockquote
cite="mid:CAJCbRZbHKhfsgfNtpTDMDpOFTBFU5GY30g6u9_FCkU2K7=dhTA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>I hope that helps.</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Sep 7, 2016 at 3:22 PM, Sven R.
          Kunze <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:srkunze@mail.de" target="_blank">srkunze@mail.de</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Maybe,
            there's a misunderstanding here and I hope I didn't waste
            too much of your and my time.<br>
            <br>
            Not sure where I got this from but my last status was that
            Arek would like to have a "shuffled" function that does
            exactly what you described. Maybe, that doesn't fit the
            reports description but his pull request will tell the
            truth. :)<br>
            <br>
            <br>
            About the confusion of returning None. It's not confusing in
            the sense of "o my god, I did it wrong, I need to learn it",
            but more, like "I used shuffle, BECAUSE it's the only one I
            could find in a hurry" and then ascertain "why the heck is
            there no alternative returning the shuffled result instead
            of overwriting my list? I would expect this from Python as
            it already provides both alternatives for sorting".<span
              class="HOEnZb"><font color="#888888"><br>
                <br>
                <br>
                Sven</font></span>
            <div class="HOEnZb">
              <div class="h5"><br>
                <br>
                <br>
                On 08.09.2016 00:02, Tim Peters wrote:<br>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  [Sven R. Kunze <<a moz-do-not-send="true"
                    href="mailto:srkunze@mail.de" target="_blank">srkunze@mail.de</a>>]<br>
                  <blockquote class="gmail_quote" style="margin:0 0 0
                    .8ex;border-left:1px #ccc solid;padding-left:1ex">
                    I am not questioning experience which everyone in a
                    team can benefit from.<br>
                    <br>
                    <br>
                    BUT experienced devs also need to recognize and
                    respect the fact that<br>
                    younger/unexperienced developers are just better in
                    detecting<br>
                    inconsistencies and bloody work-arounds. They simply
                    haven't had to live<br>
                    with them for so long. Experienced devs just are
                    stuck in a rut/are<br>
                    routine-blinded: "we've done that for years",
                    "there's no better way".<br>
                    <br>
                    <br>
                    That's the way we do it in our teams. Employing the
                    new guys as some sort of<br>
                    inconsistency detectors. This way, they learn to
                    find their way around the<br>
                    code base and they can improve it by doing so.<br>
                    <br>
                    And I would never allow it in my team, to dismiss
                    this kind of observation<br>
                    from new colleagues. It's invaluable as they will
                    become routine-blinded as<br>
                    well.<br>
                  </blockquote>
                  I have been more than willing to discuss it, and I did
                  not close the<br>
                  issue report.  I did say I was opposed to it, but
                  that's simply<br>
                  because I am, and I explained there too _why_ I was
                  opposed.<br>
                  <br>
                  Do you have anything to say about the specific
                  proposal?  I doubt<br>
                  either of us has found this meta-discussion useful. 
                  I'm still looking<br>
                  for a compelling use case.  The only concrete thing
                  anyone has noted<br>
                  in `shuffled()`'s favor so far is that sometimes
                  they're surprised by<br>
                  the behavior of random.shuffle(list) returning None in
                  an interactive<br>
                  shell (noted by you, and by another, and I cheerfully
                  own up to being<br>
                  a bit surprised by that too long ago).   But that's an
                  observation<br>
                  about `random.shuffle()`, not about the proposed
                  `shuffled()`.<br>
                  <br>
                  <br>
                  <blockquote class="gmail_quote" style="margin:0 0 0
                    .8ex;border-left:1px #ccc solid;padding-left:1ex">
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      [...] I would be far more annoyed if, e.g.,<br>
                      <br>
                      <blockquote class="gmail_quote" style="margin:0 0
                        0 .8ex;border-left:1px #ccc
                        solid;padding-left:1ex">
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          <blockquote class="gmail_quote"
                            style="margin:0 0 0 .8ex;border-left:1px
                            #ccc solid;padding-left:1ex">
                            random.shuffle(some_million_el<wbr>ement_list)<br>
                          </blockquote>
                        </blockquote>
                      </blockquote>
                        swamped my terminal with mountains of output.<br>
                    </blockquote>
                    But you readily accept this behavior for "sorted"?
                    That makes no sense at<br>
                    all.<br>
                  </blockquote>
                  Of course it does.  The only analogy to
                  random.shuffle(big_list)<br>
                  returning None that makes a lick of sense here is that
                  big_list.sort()<br>
                  also returns None.  IF a `shuffled()` function is
                  introduced, then of<br>
                  course it should return its result - just like
                  `sorted()` returns its<br>
                  result.<br>
                  <br>
                  <br>
                  <blockquote class="gmail_quote" style="margin:0 0 0
                    .8ex;border-left:1px #ccc solid;padding-left:1ex">
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      You can't both behaviors simultaneously, so the
                      status quo wins.<br>
                      Indeed, the venerable status quo ;-)<br>
                    </blockquote>
                    Nobody said to change "shuffle".<br>
                  </blockquote>
                  A verbatim quote from the first message in this
                  thread:<br>
                  <br>
                       "Also shuffle() should return self so mutating
                  methods could be chained."<br>
                </blockquote>
                <br>
                <br>
                ______________________________<wbr>_________________<br>
                Python-ideas mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:Python-ideas@python.org" target="_blank">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/mailma<wbr>n/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/codeofco<wbr>nduct/</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div class="gmail_signature" data-smartmail="gmail_signature">
          <div dir="ltr"><span><br>
              <p dir="ltr"
                style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14.6667px;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><img moz-do-not-send="true" src="https://lh6.googleusercontent.com/KjKhxPuGD6aSETVh9dazBSiS5FGrt8b37DYQ6QZAxpJIomTEygFF6ygbgOUbR0MBzycO8-LF-FspB3wTJb8LXEfIbJ6lN4H2J04EYzOZg7uaG7YcGkWesdldHuXzhLwS-etJBGO6" style="border:none" alt="pattern-sig.png" height="26" width="95"></span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10.6667px;font-family:Arial;color:rgb(102,102,102);font-weight:700;vertical-align:baseline;white-space:pre-wrap">Matt Gilson</span><span style="font-size:10.6667px;font-family:Arial;color:rgb(102,102,102);vertical-align:baseline;white-space:pre-wrap"> // SOFTWARE ENGINEER</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10.6667px;font-family:Arial;color:rgb(153,153,153);vertical-align:baseline;white-space:pre-wrap">E: </span><span style="font-size:10.6667px;font-family:Arial;color:rgb(17,85,204);vertical-align:baseline;white-space:pre-wrap"><a moz-do-not-send="true" href="mailto:matt@getpattern.com" target="_blank">matt@getpattern.com</a></span><span style="font-size:10.6667px;font-family:Arial;color:rgb(153,153,153);vertical-align:baseline;white-space:pre-wrap"> // P: 603.892.7736</span></p>
<span style="font-size:12px;font-family:Arial;color:rgb(255,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">We’re looking for beta testers.  Go </span><a moz-do-not-send="true" href="https://www.getpattern.com/meetpattern" style="text-decoration:none" target="_blank"><span style="font-size:12px;font-family:Arial;color:rgb(17,85,204);text-decoration:underline;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">here</span></a><span style="font-size:12px;font-family:Arial;color:rgb(255,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"> to sign up!</span></span>
</div></div>
</div>



</blockquote><p>
</p></body></html>