From 7c040af58742bdb88e93af6e9eb5d63610e50292 Mon Sep 17 00:00:00 2001 From: Siwalan <59278902+siwalan@users.noreply.github.com> Date: Mon, 22 Jun 2020 08:34:13 +0700 Subject: [PATCH] Correct comment annotation on to_bytes function. The original comment for to_bytes function refers that it will return an instance of str, it should return an instance of bytes instead. --- item_03_Difference_bytes_str_unicode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/item_03_Difference_bytes_str_unicode.py b/item_03_Difference_bytes_str_unicode.py index 9459448..74c72e1 100644 --- a/item_03_Difference_bytes_str_unicode.py +++ b/item_03_Difference_bytes_str_unicode.py @@ -55,7 +55,7 @@ def to_bytes(bytes_or_str): value = bytes_or_str.encode('utf-8') else: value = bytes_or_str - return value # Instance of str + return value # Instance of bytes # In Python 2, you'll need one method that takes a str or unicode and always