Skip to content

Commit e30305e

Browse files
committed
Correct ASCII encoding errors and removed unused imports
1 parent 7a544c1 commit e30305e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

item_03.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33
'''Item 3 from Effective Python'''
44

55
import logging
6-
from pprint import pprint
7-
from sys import stdout as STDOUT
86

97

108
# Example 1
119
def to_str(bytes_or_str):
12-
'''In Python 3, youll need one method that takes a str or bytes and
10+
'''In Python 3, you'll need one method that takes a str or bytes and
1311
always returns a str .'''
1412
if isinstance(bytes_or_str, bytes):
1513
value = bytes_or_str.decode('utf-8')
@@ -23,7 +21,7 @@ def to_str(bytes_or_str):
2321

2422
# Example 2
2523
def to_bytes(bytes_or_str):
26-
'''Youll need another method that takes a str or bytes and always
24+
'''You'll need another method that takes a str or bytes and always
2725
returns a bytes .'''
2826
if isinstance(bytes_or_str, str):
2927
value = bytes_or_str.encode('utf-8')

0 commit comments

Comments
 (0)