Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
pytreat-practicals-2018
Commits
bf3f9e43
Commit
bf3f9e43
authored
Feb 22, 2018
by
Paul McCarthy
🚵
Browse files
Little tweaks to comment in decorator
parent
5bf3ed18
Changes
1
Hide whitespace changes
Inline
Side-by-side
advanced_topics/06_decorators.md
View file @
bf3f9e43
...
...
@@ -383,8 +383,10 @@ def limitedMemoize(maxSize):
# remove the oldest item. In practice
# it would make more sense to remove
# the item with the oldest access
# time, but this is good enough for
# an introduction!
# time (or remove the least recently
# used item, as the built-in
# @functools.lru_cache does), but this
# is good enough for now!
if len(cache) >= maxSize:
cache.popitem(last=False)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment