OpenQuizz
Une application de gestion des contenus pédagogiques
|
Public Member Functions | |
def | __init__ (self, min=None, max=None, clamp=False) |
def | convert (self, value, param, ctx) |
def | __repr__ (self) |
![]() | |
def | __call__ (self, value, param=None, ctx=None) |
def | get_metavar (self, param) |
def | get_missing_message (self, param) |
def | split_envvar_value (self, rv) |
def | fail (self, message, param=None, ctx=None) |
Data Fields | |
min | |
max | |
clamp | |
Static Public Attributes | |
string | name = "integer range" |
![]() | |
string | name = "integer" |
![]() | |
bool | is_composite = False |
name = None | |
envvar_list_splitter = None | |
A parameter that works similar to :data:`click.INT` but restricts the value to fit into a range. The default behavior is to fail if the value falls outside the range, but it can also be silently clamped between the two edges. See :ref:`ranges` for an example.
def __init__ | ( | self, | |
min = None , |
|||
max = None , |
|||
clamp = False |
|||
) |
def __repr__ | ( | self | ) |
Reimplemented from IntParamType.
def convert | ( | self, | |
value, | |||
param, | |||
ctx | |||
) |
Converts the value. This is not invoked for values that are `None` (the missing value).
Reimplemented from IntParamType.
clamp |
max |
min |
|
static |