| |
- checkRange(value, ranges)
- Checks if the value is in the defined range.
The range definition is a list/iterator from:
- float values belonging to the defined range M{x \in {a}}
- 2-tuples of two floats which define a range not including the tuple values itself M{x \in ]a,b[}
- 2-list of two floats which define a range including the list values M{x \in [a,b]}
The order of elements is not important. So could define the set of integer numbers by a
generator returning the following sequence: M{0,1,-1,2,-2,3-,3,...} .
It returns True if the value is in one of the defined ranges.
Otherwise it returns false.
- prop(func)
- Function decorator for defining property attributes
The decorated function is expected to return a dictionary
containing one or more of the following pairs:
- fget - function for getting attribute value
- fset - function for setting attribute value
- fdel - function for deleting attribute
This can be conveniently constructed by the locals() builtin
function; see:
U{http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/205183}
|