mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Separate positional arguments from localized globals.
This commit is contained in:
parent
e208b7c5b1
commit
22b46e0ba9
2 changed files with 8 additions and 8 deletions
|
@ -123,8 +123,8 @@ def lru_cache(maxsize=100):
|
|||
http://en.wikipedia.org/wiki/Cache_algorithms#Least_Recently_Used
|
||||
|
||||
"""
|
||||
def decorating_function(user_function, tuple=tuple, sorted=sorted,
|
||||
len=len, KeyError=KeyError):
|
||||
def decorating_function(user_function,
|
||||
*, tuple=tuple, sorted=sorted, len=len, KeyError=KeyError):
|
||||
cache = OrderedDict() # ordered least recent to most recent
|
||||
cache_popitem = cache.popitem
|
||||
cache_renew = cache.move_to_end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue