Get rid of the None default for memoize_default. It shouldn't have a default if not given. This also uncovered a bug in for/else loops, that wasn't teste before.

This commit is contained in:
Dave Halter committed 2015-02-27 01:42:14 +01:00
1 parent a998c36fa3
commit f5dad437dd
3 files changed
+9 -2

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@ import inspect
NO_DEFAULT = object()
def memoize_default(default=None, evaluator_is_first_arg=False, second_arg_is_evaluator=False):
def memoize_default(default=NO_DEFAULT, evaluator_is_first_arg=False, second_arg_is_evaluator=False):
""" This is a typical memoization decorator, BUT there is one difference:
To prevent recursion it sets defaults.