On Sunday, February 24, 2013 7:09:28 PM UTC-8, Random832 wrote:<br><blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>If you want "smart" unpackable objects, why not allow d in your *d
    example to be something other than a list?<br></div>
    <br>
    Like, if you have a,*b = range(1,5); b could literally be
    range(2,5).<br></div></blockquote><div><br></div><div>Well, primarily for two reasons:</div><div><ol><li>It does not actually do anything to support smart unpackables (i.e. objects that want to be able to produce different values depending on how many items they're asked to produce).  This might be useful for the "infinite iterator" case (and I think somebody proposed it for that earlier), but that's a completely different issue than smart-unpacking..<br></li><li>More importantly, it would almost certainly break some existing code that relies on the fact that the contents of the extended-unpacking-term will always be a list, which would be bad.<br></li></ol></div><div>--Alex</div>