Last active
March 23, 2019 22:45
-
-
Save rishabh-ink/bd252d90de71d5815a90f5a7e7a26f49 to your computer and use it in GitHub Desktop.
Of pytest and lru_cache in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import lru_cache | |
from spells import cast_spell | |
@lru_cache(maxsize=2) | |
def levitate(target): | |
""" | |
Levitates `target` with the "Wingardium Leviosa" spell. | |
:param str target: Object that you would like to levitate | |
:returns: None | |
""" | |
cast_spell(spell='Wingardium Leviosa', on=target) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment