An explicit name is prolly better

kivy_mainline_and_py3.8
Tyler Goodlet 2018-11-25 19:23:07 -05:00
parent 714c203c3e
commit 75d22c6058
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ Async utils no one seems to have built into a core lib (yet).
from collections import OrderedDict
def alifo_cache(maxsize=128):
def async_lifo_cache(maxsize=128):
"""Async ``cache`` with a LIFO policy.
Implemented my own since no one else seems to have

View File

@ -14,7 +14,7 @@ from ..calc import humanize, percent_change
from . import config
from ._util import resproc, BrokerError
from ..log import get_logger, colorize_json
from .._async_utils import alifo_cache
from .._async_utils import async_lifo_cache
# TODO: move to urllib3/requests once supported
import asks
@ -400,7 +400,7 @@ async def quoter(client: Client, tickers: List[str]):
Most of the closure variables here are to deal with that.
"""
@alifo_cache(maxsize=128)
@async_lifo_cache(maxsize=128)
async def get_symbol_id_seq(symbols: Tuple[str]):
"""For each tuple ``(symbol_1, symbol_2, ... , symbol_n)``
return a symbol id sequence string ``'id_1,id_2, ... , id_n'``.