I was super turned off of Python 3 when it came out and I promptly tried it and ran
open("/dev/urandom").read(20)
and was confronted with
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 2: invalid start byte
If I had realized at the time that this error would be averted with
open("/dev/urandom", "rb").read(20)
I might have felt more charitable and less shocked (although I can see in retrospect that there's quite a good reason for this error, I might have preferred for the default file type to be binary -- presumably something that was debated extensively inside the Python 3 development effort).
open("/dev/urandom").read(20)
and was confronted with
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 2: invalid start byte
If I had realized at the time that this error would be averted with
open("/dev/urandom", "rb").read(20)
I might have felt more charitable and less shocked (although I can see in retrospect that there's quite a good reason for this error, I might have preferred for the default file type to be binary -- presumably something that was debated extensively inside the Python 3 development effort).