[Ron Adam]
> Currently we can implicitly unpack a tuple or list by using an
> assignment.  How is that any different than passing arguments to a
> function?  Does it use a different mechanism?

It is the same mechanism, so it is also only appropriate for low
volumes of data:

    a, b, c = *args             # three elements, no problem
    f(*xrange(1000000))         # too much data, not scalable, bad idea

Whenever you get the urge to write something like the latter, then take
it as cue to be passing iterators instead of unpacking giant tuples.


Raymond

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to