API Reference for Enthought Tool Suite 3.0.1

Sort by attribute or item

Example usage: sort = Sorter()

list = [(1, 2), (4, 8), (0, 3)] dict = [{'a': 3, 'b': 4}, {'a': 5, 'b': 2}, {'a': 0, 'b': 0}, {'a': 9, 'b': 9}]

sort(list) # default sort sort(list, 1) # sort by index 1 sort(dict, 'a') # sort a list of dicts by key 'a'

Attributes

Method summary

Methods

© Copyright 2002-2008 Enthought, Inc.