>>> a = 100
>>> b = 100
>>> a is b
True
>>> a = 1000
>>> b = 1000
>>> a is b
False >>> [*range(i) for i in range(5)]
Instead of this monstrosity right now. >>> [x for y in (range(i) for i in range(5)) for x in y]
Python 2.7 has some minor features that 3 dropped unfortunately, which still makes me hesitate. >>> filter(lambda x: x in 'ABC', 'ABCDEFA')
'ABCA'
Or this mostly cosmetic feature. >>> filter(lambda x: x[0] > x[1], ((1, 2), (4, 3)))
>>> filter(lambda (x, y): x > y, ((1, 2), (4, 3))) # equivalent, error in 3
Also dropped. (It's slower than using the dedicated base64 module though.) >>>'Python'.encode('base64')
'UHl0aG9u\n'
Also, I like print.
(I mistakenly manually changed the link to HTTPS.)