<div class="gmail_quote">On Wed, Aug 3, 2011 at 9:25 AM, Steven D'Aprano <span dir="ltr"><<a href="mailto:steve%2Bcomp.lang.python@pearwood.info">steve+comp.lang.python@pearwood.info</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">gc wrote:<br>
<br>
> Target lists using comma separation are great, but they don't work<br>
> very well for this task. What I want is something like<br>
><br>
> a,b,c,d,e = *dict()<br>

<br>
</div>a, b, c, d, e = [dict() for i in range(5)]<br>
</blockquote><div><br></div><div>I think this is good code -- if you want five different dicts, then you should call dict five times. Otherwise Python will magically call your expression more than once, which isn't very nice. And what if your datatype constructor has side-effects?</div>

<div><br></div><div>Katriel</div></div>