<div dir="ltr"> L = ['foo', 'bar', 'baz'] is syntactic sugar, you can write L = list('foo', 'bar', 'baz')<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 2 February 2015 at 13:43, Rob Cliffe <span dir="ltr"><<a href="mailto:rob.cliffe@btinternet.com" target="_blank">rob.cliffe@btinternet.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><span class="">
    <br>
    <div>On 02/02/2015 12:38, Todd wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On Mon, Feb 2, 2015 at 1:10 PM, Rob
            Cliffe <span dir="ltr"><<a href="mailto:rob.cliffe@btinternet.com" target="_blank">rob.cliffe@btinternet.com</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000"><span> <br>
                  <div>On 02/02/2015 11:19, Todd wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">
                      <div class="gmail_extra"><br>
                        <div class="gmail_quote">On Mon, Feb 2, 2015 at
                          11:53 AM, Chris Angelico <span dir="ltr"><<a href="mailto:rosuav@gmail.com" target="_blank">rosuav@gmail.com</a>></span>
                          wrote:<br>
                          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>On
                              Mon, Feb 2, 2015 at 9:26 PM, Todd <<a href="mailto:toddrjen@gmail.com" target="_blank">toddrjen@gmail.com</a>>

                              wrote:<br>
                              > First, it wouldn't be a replacement. 
                              The existing range syntax would still<br>
                              > exist.<br>
                              ><br>
                              > But the reason it is beneficial is
                              the same reason we have [a, b, c] for<br>
                              > list, {a:1, b:2, c:3} for dicts, {a,
                              b, c} for sets, and (a, b, c) for<br>
                              > tuples.  </span></blockquote>
                        </div>
                      </div>
                    </div>
                  </blockquote>
                </span> Well, we have to have *some* syntax for literal
                lists, dicts etc.<br>
                But we already have range, so there is no compelling
                need to add new syntax.<br>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>Why do we need literals at all?  They are just
              syntactic sugar.  Python went a long time without a set
              literal.<br>
            </div>
          </div>
        </div>
      </div>
    </blockquote></span>
    Well, if you'd rather write<br>
        L = list()<br>
        L.add('foo')<br>
        L.add('bar')<br>
        L.add('baz')<br>
    than<br>
        L = ['foo', 'bar', 'baz']<br>
    then good luck to you.<br>
    <br>
    <br>
  </div>

<br>_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" target="_blank">http://python.org/psf/codeofconduct/</a><br></blockquote></div><br></div>