updated from Atlas

This commit is contained in:
Luciano Ramalho committed 2015-04-01 22:48:56 -03:00
1 parent aab93699a4
commit 573e1a94c4
109 files changed
+5 -6

No files matched your search

File renamed without changes.
File renamed without changes.
+1 -1
View File
@@ -23,6 +23,6 @@ with open(sys.argv[1], encoding='utf-8') as fp:
index[word] = occurrences # <3> index[word] = occurrences # <3>
# print in alphabetical order # print in alphabetical order
for word in sorted(index, key=str.upper): for word in sorted(index, key=str.upper): # <4>
print(word, index[word]) print(word, index[word])
# END INDEX0 # 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.
File renamed without changes.
@@ -19,7 +19,7 @@
# BEGIN CLIP_ANNOT # BEGIN CLIP_ANNOT
def clip(text:str, max_len:'int > 0'=80) -> str: def clip(text:str, max_len:'int > 0'=80) -> str: # <1>
"""Return text clipped at the last space before or after max_len """Return text clipped at the last space before or after max_len
""" """
end = None end = None
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -73,7 +73,7 @@ class Promotion(ABC): # the Strategy: an Abstract Base Class
@abstractmethod @abstractmethod
def discount(self, order): def discount(self, order):
"""Return discount as an positive dollar amount""" """Return discount as a positive dollar amount"""
class FidelityPromo(Promotion): # first Concrete Strategy 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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -8,9 +8,8 @@ def register(active=True): # <2>
% (active, func)) % (active, func))
if active: # <4> if active: # <4>
registry.add(func) registry.add(func)
else: # <5> else:
if func in registry: registry.discard(func) # <5>
registry.remove(func)
return func # <6> return func # <6>
return decorate # <7> 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.
Loaded 100 of 109 files, more files were not shown because too many files have changed in this diff. Show more