mercurial/formatter.py
branchstable
changeset 43335 242ad45b60b3
parent 43106 d783f945a701
child 43337 7e20b705da5b
equal deleted inserted replaced
43334:4128ffba4431 43335:242ad45b60b3
   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