Revision 7105
Added by Aaron Marcuse-Kubitza almost 12 years ago
lib/scalar.py | ||
---|---|---|
1 | 1 |
# Scalars (single, literal values) |
2 | 2 |
|
3 |
import datetime |
|
3 | 4 |
import types |
4 | 5 |
|
5 | 6 |
def is_scalar(value): |
6 |
return isinstance(value, (types.NoneType, bool, int, float, basestring)) |
|
7 |
return isinstance(value, (types.NoneType, bool, int, float, basestring, |
|
8 |
datetime.datetime)) |
Also available in: Unified diff
scalar.py: is_scalar(): Added datetime.datetime