You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great if we have the INTEGER_SCHEMA and FLOAT_SCHEMA formats. We can use these schemas in order the validate whether the given content is in integer or float format.
Actually, there is already an Integer class in the schema file, we can easily use this:
defcheck_match(self, object):
ifisinstance(object, bool) ornotisinstance(object, int):
# We need to check for bool as a special case, since bool# is for historical reasons a subtype of int.raiseexceptions.FormatError(
'Got '+repr(object) +' instead of an integer.')
Description of issue or feature request:
It would be great if we have the
INTEGER_SCHEMA
andFLOAT_SCHEMA
formats. We can use these schemas in order the validate whether the given content is in integer or float format.Actually, there is already an Integer class in the schema file, we can easily use this:
At the end of the day, this is what will we have:
The text was updated successfully, but these errors were encountered: