More random python observations from a perl programmer

Toby Dickenson htrd90 at zepler.org
Sun Aug 22 08:58:51 EDT 1999


nascheme at ucalgary.ca (Neil Schemenauer) wrote:

>This is called tuple unpacking.  It is definitely cool.  In the
>newer versions of Python unpacking works on other sequences as
>well.  For example:
>
>	x, y, z = (1, 2, 3)
>	a, b, c = [1, 2, 3]

Cool, I never knew that worked with other sequences too!

I guess "_tuple_ unpacking" isn't the best name for this anymore ;-)

Thanks,


Toby Dickenson




More information about the Python-list mailing list