On 13 December 2011 09:50, Eelco <hoogendoorn.ee...@gmail.com> wrote: >> To answer that question: for the same reasons. The conversion is >> wasteful; allowing python to do the right thing based on a >> typeconstraint is not. Plus, it is less code, and more readable code; >> the only rule you have to learn is quite general, which is that :: is >> a type constraint annotation; no need to remember specifics, like >> 'unpacking always returns lists for some arbitrary reason'. > > Oh my bad; actually, that should be: > > 'collecting the remainder of an unpacked iterable using * will always > yield a list. That is, unless the construct appears inside a function > definition; then somehow a tuple is always the right choice'
When you quote somebody (even yourself), it would be helpful if you attributed your quote. -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list