Panda3D

- Main Page
- Packages
- Classes

- Packages
- Package Functions

Classes | Functions

# Package showbase.LazySort

## Classes
class | LazySortTest
## Functions
def | itersorted
def | P
def | test

## Function Documentation

def showbase.LazySort.itersorted | ( |  | iterable,
|  |  | cmp = `cmp`,
|  |  | key = `lambda x: x`,
|  |  | reverse = `False`
| ) |  |

    This function returns a generator object that yields sorted items from
    'iterable'.

    It implements a form of lazy sorting that's most useful in two cases:
    1) When you only need the first few values in the sorted data.
    2) When you want to amortize the cost of the sort over the time
       you use the data.

    It is to be considered a 'stable sort', where values with equivalent
    sorting criteria maintain their relative order as it is in the input
    data set.

    'cmp' MUST return values in [-1,0,1]. Otherwise, behavior is
    undefined, and will most likely be very incorrect.

def showbase.LazySort.P | ( |  | i | ) |

def showbase.LazySort.test | ( |  | ) |

All Classes Namespaces Functions Variables Enumerations Enumerator Properties