equal
deleted
inserted
replaced
132 dateutil, |
132 dateutil, |
133 stringutil, |
133 stringutil, |
134 ) |
134 ) |
135 |
135 |
136 pickle = util.pickle |
136 pickle = util.pickle |
|
137 |
|
138 |
|
139 def isprintable(obj): |
|
140 """Check if the given object can be directly passed in to formatter's |
|
141 write() and data() functions |
|
142 |
|
143 Returns False if the object is unsupported or must be pre-processed by |
|
144 formatdate(), formatdict(), or formatlist(). |
|
145 """ |
|
146 return isinstance(obj, (type(None), bool, int, pycompat.long, float, bytes)) |
137 |
147 |
138 |
148 |
139 class _nullconverter(object): |
149 class _nullconverter(object): |
140 '''convert non-primitive data types to be processed by formatter''' |
150 '''convert non-primitive data types to be processed by formatter''' |
141 |
151 |