Int

Convert a value to an integer.

Example:

>>> Int.to_python('10')
10
>>> Int.to_python('ten')
Traceback (most recent call last):
    ...
Invalid: Please enter an integer value

Messages

badType:
The input must be a string (not a %(type)s: %(value)r)
empty:
Please enter a value
integer:
Please enter an integer value
noneType:
The input must be a string (not None)
tooHigh:
Please enter an integer below %(max)i
tooLow:
Please enter an integer above %(min)i

Attributes

a gettextargs

{}

a strip

False

a use_builtins_gettext

True

a accept_python

True

a min

None

a __singletonmethods__

('to_python', 'from_python', 'message', 'all_messages', 'subvalidators')

a max

None

a declarative_count

25

a __unpackargs__

()

a compound

False

a not_empty

False

a __mutableattributes__

()

a repeating

False

Methods

f __call__(self, *args, **kw) ...

f __classinit__(cls, new_attrs) ...

f __init__(self, *args, **kw) ...

f __sourcerepr__(self, source, binding=None) ...

f __classsourcerepr__(cls, source, binding=None) ...

f __initargs__(self, args) ...

f validate_python(self, value, state) ...

See the source for more information.