diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-06-03 10:08:33 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-06-03 10:08:33 -0400 |
commit | 47d29eae8fa14ab7b1aab63797860a475338f950 (patch) | |
tree | 47a386c0fa1a32e455ea72cfad46cb4a59df8446 /lib/sqlalchemy | |
parent | 36d2b40cf55bc0f4e850e9ec4e905f0051f573f2 (diff) | |
download | sqlalchemy-47d29eae8fa14ab7b1aab63797860a475338f950.tar.gz |
- changelog for pr bitbucket:54
- alter the approach so that the initial callable is working just like add_criteria/with_criteria
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r-- | lib/sqlalchemy/ext/baked.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/sqlalchemy/ext/baked.py b/lib/sqlalchemy/ext/baked.py index 96e1f1312..f01e0b348 100644 --- a/lib/sqlalchemy/ext/baked.py +++ b/lib/sqlalchemy/ext/baked.py @@ -34,11 +34,8 @@ class BakedQuery(object): __slots__ = 'steps', '_bakery', '_cache_key', '_spoiled' def __init__(self, bakery, initial_fn, args=()): - if args: - self._cache_key = tuple(args) - else: - self._cache_key = () - self._update_cache_key(initial_fn) + self._cache_key = () + self._update_cache_key(initial_fn, args) self.steps = [initial_fn] self._spoiled = False self._bakery = bakery @@ -49,7 +46,7 @@ class BakedQuery(object): _bakery = util.LRUCache(size) - def call(initial_fn, args=()): + def call(initial_fn, *args): return cls(_bakery, initial_fn, args) return call |