On Jan 22, 2:53 am, Paul Rubin <http://phr...@nospam.invalid> wrote: > 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.
PEP 3113 if you really care. -- http://mail.python.org/mailman/listinfo/python-list