<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Sat, Oct 15, 2016 at 8:36 PM Chris Angelico <<a href="mailto:rosuav@gmail.com">rosuav@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sun, Oct 16, 2016 at 4:33 AM, אלעזר <<a href="mailto:elazarg@gmail.com" class="gmail_msg" target="_blank">elazarg@gmail.com</a>> wrote:<br class="gmail_msg">
> You are confusing here two distinct roles of the parenthesis: disambiguation<br class="gmail_msg">
> as in "(1 + 2) * 2", and tuple construction as in (1, 2, 3). This overload<br class="gmail_msg">
> is the reason that (1) is not a 1-tuple and we must write (1,).<br class="gmail_msg">
<br class="gmail_msg">
Parentheses do not a tuple make. Commas do.<br class="gmail_msg">
<br class="gmail_msg">
1, 2, 3, # three-element tuple<br class="gmail_msg">
1, 2, # two-element tuple<br class="gmail_msg">
1, # one-element tuple<br class="gmail_msg">
<br class="gmail_msg"></blockquote><div>And what [1, 2, 3] means? It's very different from [(1,2,3)].</div><div><br></div><div>Python explicitly allow 1, 2, 3 to mean tuple in certain contexts, I agree.</div><div> </div><div>Elazar</div></div></div>