Skip to content

Commit 573e1a9

Browse files
committed
updated from Atlas
1 parent aab9369 commit 573e1a9

File tree

109 files changed

+5
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+5
-6
lines changed
File renamed without changes.
File renamed without changes.

dicts/index0.py renamed to 03-dict-set/index0.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
index[word] = occurrences # <3>
2424

2525
# print in alphabetical order
26-
for word in sorted(index, key=str.upper):
26+
for word in sorted(index, key=str.upper): # <4>
2727
print(word, index[word])
2828
# END INDEX0
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

functions/clip_annot.py renamed to 05-1class-func/clip_annot.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
# BEGIN CLIP_ANNOT
2121

22-
def clip(text:str, max_len:'int > 0'=80) -> str:
22+
def clip(text:str, max_len:'int > 0'=80) -> str: # <1>
2323
"""Return text clipped at the last space before or after max_len
2424
"""
2525
end = None
File renamed without changes.

patterns-func/classic_strategy.py renamed to 06-dp-1class-func/classic_strategy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Promotion(ABC): # the Strategy: an Abstract Base Class
7373

7474
@abstractmethod
7575
def discount(self, order):
76-
"""Return discount as an positive dollar amount"""
76+
"""Return discount as a positive dollar amount"""
7777

7878

7979
class FidelityPromo(Promotion): # first Concrete Strategy
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

decorators/registration_param.py renamed to 07-closure-deco/registration_param.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ def decorate(func): # <3>
88
% (active, func))
99
if active: # <4>
1010
registry.add(func)
11-
else: # <5>
12-
if func in registry:
13-
registry.remove(func)
11+
else:
12+
registry.discard(func) # <5>
1413

1514
return func # <6>
1615
return decorate # <7>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)