| Trees | Indices | Help |
|
|---|
|
|
object --+
|
_abcoll.Sized --+
|
object --+ |
| |
_abcoll.Iterable --+
|
object --+ |
| |
_abcoll.Container --+
|
_abcoll.Sequence --+
|
_abcoll.MutableSequence --+
|
UserList.UserList --+
|
DsuList
A class to sort a list with special behaviors. The list is expected to be a Decorate-Sort-Undecorate list, e.g. a sequence of tuples with the same length. The class has data members to control sort order, asending or descending, and can place None values after defined values.
|
|||
|
Inherited from |
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
|
Inherited from Inherited from Inherited from Inherited from |
|||
|
|||
|
|||
init_list (list of tuples)
A list of tuples to be sorted. Tuples to sort also can be added
via the 'append()' method. The tuples are sorted according to the
first item in each tuple, ties are broken by sorting by the second
item, etc.
item_order (list of ints)
Optional list of integers indicating whether specifying ascending
or descending sort order for the tuple items. A positive value at
the same index of a tuple item will cause those items in the list
to be sorted in ascending order. A negative value at the same
index will cause those items to be sorted in descending order.
Default is to sort in ascending order.
none_is_last (bool)
If True then None values are placed after defined values,
which matches the behavior in Maestro or Excel, but is
not pythonic.
|
Custom sort function that imitates native python lexicographical
list sorting but allows item level control over sort order,
and can optionally place None values at the end of a list.
sequence_1 (sequence)
Sequence that emits items to be compared.
sequence_2 (sequence)
Sequence that emits items to be compared, of the same type
as sequence_1,
|
Custom item comparison method that applies policy to item order and
handles None values according to the 'none_is_last' attribute.
value_1
value_2
The two values being compared.
order
Optional sort order. Default is ASCENDING.
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Wed Aug 3 07:59:58 2016 | http://epydoc.sourceforge.net |