View source on GitHub |
Raises an exception if value is not a valid integer.
google.appengine.api.datastore_types.ValidateInteger(
value,
name='unused',
exception=google.appengine.api.datastore_errors.BadValueError
,
empty_ok=False,
zero_ok=False,
negative_ok=False
)
An integer is valid if it's not negative or empty and is an integer
(either int
or long
). The exception type raised can be specified
with the exception argument; it defaults to BadValueError
.
Args | |
---|---|
value
|
The value to validate. |
name
|
The name of this value; used in the exception message. |
exception
|
The type of exception to raise. |
empty_ok
|
Allow None value.
|
zero_ok
|
Allow zero value. |
negative_ok
|
Allow negative value. |