bslatkin / effectivepython

Effective Python: Second Edition — Source Code and Errata for the Book
https://effectivepython.com
2.24k stars 718 forks source link

Item 3: when a handle is in text mode #93

Open feynmanpan opened 3 years ago

feynmanpan commented 3 years ago

hi brett:

In 2ed, you wrote: "when a handle is in text mode, it uses the system's default text encoding to interpret binary data using the bytes.encode (for writing) and str.decode (for reading) methods."

I think that should be: ..... str.encode (for writing) and bytes.decode (for reading) ....

please confirm, thanks!

bslatkin commented 4 months ago

Yes that's right. These were swapped. Thank you for the report!