Open GreatBahram opened 5 years ago
https://github.com/mhajiloo/persiantools/blob/a88112b5955cb8214e84467357bee61cc01242ba/persiantools/utils.py#L14-L32
isintance takes a tuple of classes for the second argument. So you could basicly do something like this:
isintance
if not isinstance(value, (int, float)): raise TypeError('value should int or float object') return int(value)
https://github.com/mhajiloo/persiantools/blob/a88112b5955cb8214e84467357bee61cc01242ba/persiantools/utils.py#L14-L32
isintance
takes a tuple of classes for the second argument. So you could basicly do something like this: