4XG3OenH6d4TAakW3DdiPl changeset

Changeset356535626466 (b)
ParentNone (a)
ab
0+>>> tests = [None, '', [], {}, (), 0, False, set(), 1, 2]
0+>>> print ''.join('"if %r:" return %s\n' % (test, bool(test)) for test in tests)
0+"if None:" return False
0+"if '':" return False
0+"if []:" return False
0+"if {}:" return False
0+"if ():" return False
0+"if 0:" return False
0+"if False:" return False
0+"if set([]):" return False
0+"if 1:" return True
0+"if 2:" return True
0+
0+>>>
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- Revision None
+++ Revision 356535626466
@@ -0,0 +1,14 @@
+>>> tests = [None, '', [], {}, (), 0, False, set(), 1, 2]
+>>> print ''.join('"if %r:" return %s\n' % (test, bool(test)) for test in tests)
+"if None:" return False
+"if '':" return False
+"if []:" return False
+"if {}:" return False
+"if ():" return False
+"if 0:" return False
+"if False:" return False
+"if set([]):" return False
+"if 1:" return True
+"if 2:" return True
+
+>>>