3 ms·
Also, dict comprehensions. You can fake them in 2.x, but the syntax is ugly and cumbersome.
by archangel_one 14y ago
Also, dict comprehensions. You can fake them in 2.x, but the syntax is ugly and cumbersome.
- masklinn 14y agodict comprehensions were backported to 2.7 $ python2.7 Python 2.7.3 (default, Apr 13 2012, 13:51:30) >>> {i: i+1 for i in range(5)} {0: 1, 1: 2, 2: 3, 3: 4, 4: 5}