Skip to content

Commit 103e6c5

Browse files
committed
add user-friendly prompt
1 parent 279e985 commit 103e6c5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

memoization.py

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import warnings
44
from functools import wraps
55

6+
__version__ = 'v0.0.2'
67
_cache = {}
78

89

@@ -166,3 +167,9 @@ def _retrieve_safe_function_id(func):
166167
if function_id not in _cache.keys(): # panic
167168
_error_unrecognized_function(func)
168169
return function_id
170+
171+
172+
if __name__ == '__main__':
173+
import sys
174+
sys.stderr.write('python-memoization ' + __version__ + ': A minimalist functional memoization lib for Python\n')
175+
sys.stderr.write('Go to https://github.com/lonelyenvoy/python-memoization for usage and more details.\n')

0 commit comments

Comments
 (0)