示例#1
0
 def serialize(duration, protocol_version):
     try:
         m, d, n = duration.months, duration.days, duration.nanoseconds
     except AttributeError:
         raise TypeError('DurationType arguments must be a Duration.')
     return vints_pack([m, d, n])
示例#2
0
 def serialize(duration, protocol_version):
     try:
         m, d, n = duration.months, duration.days, duration.nanoseconds
     except AttributeError:
         raise TypeError('DurationType arguments must be a Duration.')
     return vints_pack([m, d, n])