Project

General

Profile

« Previous | Next » 

Revision 7105

scalar.py: is_scalar(): Added datetime.datetime

View differences:

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