Steven D'Aprano <ste...@remove.this.cybersource.com.au> writes:
> That is better written as:
> l = sorted(abcd.items(), key=lambda x:(x[1].lower(), x[0]))

In Python 2.x, I prefer the style

  l = sorted(abcd.iteritems(), key=lambda (k,v): (v.lower(), k))

but Python 3.0 breaks the tuple unpacking per some PEP.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to