12.04.18 18:12, Guido van Rossum пише:
I hear where you're coming from but I really don't think we should do
this. If you don't have the right expectation already it's hard to guess
what it means. I would much rather spend effort on a proper matching
statement.
There are few applications of t
I hear where you're coming from but I really don't think we should do this.
If you don't have the right expectation already it's hard to guess what it
means. I would much rather spend effort on a proper matching statement.
On Thu, Apr 12, 2018 at 2:54 AM, Serhiy Storchaka
wrote:
> Yet one crazy
> On 2018 Apr 12 , at 5:54 a, Serhiy Storchaka wrote:
>
> Yet one crazy idea. What if allow default values for targets in multi-target
> assignment?
>
>>>> (a, b=0) = (1, 2)
>>>> a, b
>(1, 2)
>>>> (a, b=0) = (1,)
>>>> a, b
>(1, 0)
>>>> (a, b=0) = ()
>Traceback (
Yet one crazy idea. What if allow default values for targets in
multi-target assignment?
>>> (a, b=0) = (1, 2)
>>> a, b
(1, 2)
>>> (a, b=0) = (1,)
>>> a, b
(1, 0)
>>> (a, b=0) = ()
Traceback (most recent call last):
File "", line 1, in
ValueError: not e