[Python-ideas] Unpack of sequences

Serhiy Storchaka storchaka at gmail.com
Thu Aug 30 08:57:41 CEST 2012


On 29.08.12 21:20, Steven D'Aprano wrote:
> But once you have multiple
> targets,
> it gets ugly soon, e.g. the typical enumeration (anti-)pattern:
>
> RED, YELLOW, BLUE, GREEN = 'RED', 'YELLOW', 'BLUE', 'GREN'

   for n in 'RED', 'YELLOW', 'BLUE', 'GREN':
       globals()[n] = n





More information about the Python-ideas mailing list