bslatkin / effectivepython

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

item 3: should be str.encode and bytes.decode at top of page 10 #90

Closed peterbayerle closed 3 years ago

peterbayerle commented 3 years ago

am I misreading this? quick check in the interpreter shows bytes.encode doesn't exist:

>>> bytes.encode
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: type object 'bytes' has no attribute 'encode'
>>> str.encode
<method 'encode' of 'str' objects>

and it wouldn't make sense to encode bytes prior to writing anyway right?

peterbayerle commented 3 years ago

noticed this issue is already open...

bslatkin commented 1 month ago

Thank you for the report. Deduping with #93