copysort patch, was RE: [Python-Dev] inline sort option
Delaney, Timothy C (Timothy)
tdelaney at avaya.com
Tue Oct 21 19:53:01 EDT 2003
More information about the Python-Dev mailing list
Tue Oct 21 19:53:01 EDT 2003
- Previous message: [Python-Dev] accumulator display syntax
- Next message: [Python-Dev] accumulator display syntax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> From: Greg Ewing [mailto:greg at cosc.canterbury.ac.nz] > > Maybe dicts should have a .sortedkeys() method? The specialised > method name would help stave off any temptation to add varied sort > methods to other types. -1. I think that: d = {1: 2, 3: 4} for i in list.sorted(d): print i or d = {1: 2, 3: 4} for i in list.sorted(d.iterkeys()): print i looks very clean and unambiguous. And is even better at staving off temptation to add varied sort methods to other types. Tim Delaney
- Previous message: [Python-Dev] accumulator display syntax
- Next message: [Python-Dev] accumulator display syntax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list