[ create a new paste ] login | about

Link: http://codepad.org/d0QqEF2x    [ raw code | output | fork | 1 comment ]

RogerPate - Python, pasted on Feb 19:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
def f():
  global False

  simple = False
  False, complex = simple, not simple or (yield True)
  True = complex, False or simple

  False = filter(None, reversed((complex, False and simple)))
  simple = not not True and False
  False, complex = simple, not simple

  for x in [simple, complex, True, False]:
    print repr(x)
  print

  yield not simple is not False > True < complex >> 42

print reduce(lambda a, b: a.next() or b.send(False), [f()]*2)


Output:
1
2
3
4
5
6
[True]
False
(True, False)
[True]

True


Create a new paste based on this one


Comments:
posted by RogerPate on Feb 19
Don't ask.
reply