Guest User

Untitled

a guest
Aug 20th, 2012
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. non_null = lambda x: (i for i in x if x isnt None)
  2. # Loop time!
  3. with till_loop_stop():
  4.     with catch(KeyboardInterrupt):
  5.         for item in non_null(get_items(from_socket)):
  6.             counts['received'] += 1
  7.             for modified in modify(item):
  8.                 send_to(to_socket, modified)
  9.                 counts['sent'] += 1
Advertisement
Add Comment
Please, Sign In to add comment