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))
def mess_on_next(time, value): return (time, notification.OnNext(value))