Revision 7115
Added by Aaron Marcuse-Kubitza about 12 years ago
lib/scalar.py | ||
---|---|---|
6 | 6 |
def is_scalar(value): |
7 | 7 |
return isinstance(value, (types.NoneType, bool, int, float, basestring, |
8 | 8 |
datetime.datetime)) |
9 |
|
|
10 |
def is_nonnull_scalar(value): return is_scalar(value) and value != None |
Also available in: Unified diff
scalar.py: Added is_nonnull_scalar()