Logo Search packages:      
Sourcecode: mascyma version File versions  Download package

matplotlib::cbook::Sorter Class Reference

List of all members.


Detailed Description


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'

Definition at line 71 of file cbook.py.


Public Member Functions

def byAttribute
def byItem

Static Public Attributes

 sort = byItem

Private Member Functions

def _helper

Static Private Attributes

 __call__ = byItem

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index