getLevelFor ( ob, default=NOT_GIVEN )
Get a level integer for ob , or return default
If ob is in fact a number (i.e. adding 0 to it works), return as-is.
If ob is a string representation of an integer, return numeric value,
so that functions which want to accept either numbers or level names
can do so by calling this converter.
If no conversion can be found, and no default is specified, raise
LookupError.
|
getLevelName ( lvl, default=NOT_GIVEN )
Get a name for integer lvl , or return default
If lvl is not a recognized level, and default is not given,
return str(lvl) .
|