Thomas Wouters <[EMAIL PROTECTED]> added the comment:

On Sat, Mar 15, 2008 at 9:12 AM, Guido van Rossum <[EMAIL PROTECTED]>
wrote:

>
> Guido van Rossum <[EMAIL PROTECTED]> added the comment:
>
> Didn't you say it does sets too?  Does this work?
> a = [1, 2, 3]
> {1, *a, 0, 4}   # {0, 1, 2, 3, 4}

Yes.

>
>
> How about dicts?
> kwds = {'z': 0, 'w': 12}
> {'x': 1, 'y': 2, **kwds}  # {'x': 1, 'y': 2, 'z': 0, 'w': 12}

Not yet.

>
>
> Also, now that we support
>
> [*a, b, c]
>
> shouldn't we also support
>
> foo(*a, b, c)
>

Sure. (And also 'foo(*a, *b, *c)'?) But have you taken a look lately at the
function definition grammar? I need some time to sort it out :)

Added file: http://bugs.python.org/file9674/unnamed

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2292>
__________________________________
<br><br><div class="gmail_quote">On Sat, Mar 15, 2008 at 9:12 AM, Guido van 
Rossum &lt;<a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>&gt; 
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid 
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Guido van Rossum &lt;<a href="mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]</a>&gt; added the comment:<br>
<br>
Didn&#39;t you say it does sets too? &nbsp;Does this work?<br>
a = [1, 2, 3]<br>
{1, *a, 0, 4} &nbsp; # {0, 1, 2, 3, 
4}</blockquote><div><br>Yes.<br>&nbsp;<br></div><blockquote class="gmail_quote" 
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; 
padding-left: 1ex;"><br>
<br>
How about dicts?<br>
kwds = {&#39;z&#39;: 0, &#39;w&#39;: 12}<br>
{&#39;x&#39;: 1, &#39;y&#39;: 2, **kwds} &nbsp;# {&#39;x&#39;: 1, &#39;y&#39;: 
2, &#39;z&#39;: 0, &#39;w&#39;: 12}</blockquote><div><br>Not 
yet.<br>&nbsp;<br></div><blockquote class="gmail_quote" style="border-left: 1px 
solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
Also, now that we support<br>
<br>
[*a, b, c]<br>
<br>
shouldn&#39;t we also support<br>
<br>
foo(*a, b, c)<br>
<div><div></div><div class="Wj3C7c"></div></div></blockquote><div><br>Sure. 
(And also &#39;foo(*a, *b, *c)&#39;?) But have you taken a look lately at the 
function definition grammar? I need some time to sort it out :)<br>
</div></div><br>-- <br>Thomas Wouters &lt;<a href="mailto:[EMAIL 
PROTECTED]">[EMAIL PROTECTED]</a>&gt;<br><br>Hi! I&#39;m a .signature virus! 
copy me into your .signature file to help me spread!
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to