Skip to content

Commit a4f99ed

Browse files
committed
Pep8 corrections
Some minor adjustments
1 parent 029cec2 commit a4f99ed

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

3-tier.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ def get_product_information(self, product):
3939
if product_info:
4040
print('PRODUCT INFORMATION:')
4141
print('Name: {0}, Price: {1:.2f}, Quantity: {2:}'.format(
42-
product.title(), product_info.get('price', 0),
43-
product_info.get('quantity', 0)))
42+
product.title(), product_info.get('price', 0),
43+
product_info.get('quantity', 0)))
4444
else:
45-
print('That product "{0}" does not exist in the records'.format(product))
45+
print('That product "{0}" does not exist in the records'.format(
46+
product))
4647

4748

4849
def main():

__pycache__/mediator.cpython-33.pyc

-7 Bytes
Binary file not shown.

chain.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(self):
3939
h1.successor(h2)
4040
h2.successor(h3)
4141

42-
self.handlers = (h1,h2,h3)
42+
self.handlers = (h1, h2, h3)
4343

4444
def delegate(self, requests):
4545
for request in requests:

decorator.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# http://stackoverflow.com/questions/3118929/implementing-the-decorator-pattern-in-python
22

3+
34
class foo_decorator(object):
45
def __init__(self, decoratee):
56
self._decoratee = decoratee
@@ -11,13 +12,15 @@ def f1(self):
1112
def __getattr__(self, name):
1213
return getattr(self._decoratee, name)
1314

15+
1416
class undecorated_foo(object):
1517
def f1(self):
1618
print("original f1")
1719

1820
def f2(self):
1921
print("original f2")
2022

23+
2124
@foo_decorator
2225
class decorated_foo(object):
2326
def f1(self):

0 commit comments

Comments
 (0)