Selection.Selection

Name

Selection.Selection -- Defines restrictions on an iterator

Synopsis

class Selection.Selection:
    self.search
    self.sort

    def __init__ (self, search = None, sort = None):
    def iterator (self, iterator):

Usage

This class can hold Search and Sort criterions and provide an iterator that follows these restrictions.

Members

self.search

The current Tester object.

Warning

Changing this attribute won't change the behaviour of iterators that were previously returned by iterator.

self.sort

The current Sort object.

Warning

Changing this attribute won't change the behaviour of iterators that were previously returned by iterator.

Methods

__init__ (self, search, sort)

selection = Selection (search = some_search, sort = some_sorting)

Creates a new Selection filter.

iterator (self, iterator)

Returns a new iterator that will loop over the elements of the iterator passed as argument, but according to the current filtering.