[Python-ideas] Generator unpacking

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Feb 14 15:45:06 EST 2016


Georg Brandl wrote:

> But thinking about it, this is also legal at the moment:
> 
>     [] = []
> 
> Interestingly, this raises:
> 
>     () = ()

That's weird. I'm guessing it's because () gets treated as
a constant in some part of the compilation pipeline, and
then the assignment is rejected on the grounds that you
can't assign to a constant,

-- 
Greg


More information about the Python-ideas mailing list