示例#1
0
 def map_element(time, element):
     if element == '|':
         return (time, notification.OnCompleted())
     elif element == '#':
         return (time, notification.OnError(error))
     else:
         value = try_number(element)
         value = lookup.get(value, value)
         return (time, notification.OnNext(value))
示例#2
0
def mess_on_next(time, value):
    return (time, notification.OnNext(value))