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 <<a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>>
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 <<a href="mailto:[EMAIL PROTECTED]">[EMAIL
PROTECTED]</a>> added the comment:<br>
<br>
Didn't you say it does sets too? Does this work?<br>
a = [1, 2, 3]<br>
{1, *a, 0, 4} # {0, 1, 2, 3,
4}</blockquote><div><br>Yes.<br> <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 = {'z': 0, 'w': 12}<br>
{'x': 1, 'y': 2, **kwds} # {'x': 1, 'y':
2, 'z': 0, 'w': 12}</blockquote><div><br>Not
yet.<br> <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'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 'foo(*a, *b, *c)'?) 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 <<a href="mailto:[EMAIL
PROTECTED]">[EMAIL PROTECTED]</a>><br><br>Hi! I'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