From 591b0cd3d135962c45ce6591aa911ac8c104262b Mon Sep 17 00:00:00 2001 From: Anton Kosinov Date: Tue, 26 Jan 2016 19:28:28 +0200 Subject: [PATCH] PEP8 implementation --- example_code/item_01.py | 4 ---- example_code/item_03_example_03.py | 5 +---- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/example_code/item_01.py b/example_code/item_01.py index cc98001..2816ad4 100755 --- a/example_code/item_01.py +++ b/example_code/item_01.py @@ -15,10 +15,6 @@ # limitations under the License. # Preamble to mimick book environment -import logging -from pprint import pprint -from sys import stdout as STDOUT - # Example 1 import sys diff --git a/example_code/item_03_example_03.py b/example_code/item_03_example_03.py index 344edab..4cf2afe 100755 --- a/example_code/item_03_example_03.py +++ b/example_code/item_03_example_03.py @@ -15,15 +15,12 @@ # limitations under the License. # Preamble to mimick book environment -import logging -from pprint import pprint -from sys import stdout as STDOUT # Example 3 def to_unicode(unicode_or_str): if isinstance(unicode_or_str, str): - value = unicode_or_str.decode('utf-8') + value = unicode_or_str.encode('utf-8') else: value = unicode_or_str return value # Instance of unicode