kumar303/unicode-in-python — pull request #2 by phihag (2011-11-15 15:45:15+00:00)
Title: Write bytes to a binary stream, instead of a string one

open('file', 'w').write('bytes')

is wrong, the file should be opened with `'wb'`. Most notably, the equivalent Python 3 will crash

# Python 3
open('file', 'w').write(b'bytes')