2nd edition, Item 3: Know the Difference between bytes and str, in the last paragraph on page 9, it reads:
This fails because the file was opened in read text mode ('r') instead of read binary mode ('rb'). When a handle is in text mode, it uses the system's default text encoding to interpret binary data using bytes.encode (for writing) and str.decode (for reading) methods.
I think it's supposed be:
[...] str.encode (for writing) and bytes.decode (for reading) methods.
2nd edition, Item 3: Know the Difference between
bytes
andstr
, in the last paragraph on page 9, it reads:I think it's supposed be: