Use pythonic sequence splitting with `zip()`

kivy_mainline_and_py3.8
Tyler Goodlet 2018-12-11 17:09:36 -05:00
parent e1be80e9e0
commit 7b5c73bb45
1 changed files with 1 additions and 2 deletions

View File

@ -504,8 +504,7 @@ async def option_quoter(client: Client, tickers: List[str]):
``(symbol_date_1, symbol_date_2, ... , symbol_date_n)``
return a contract dict.
"""
symbols = map(itemgetter(0), sym_date_pairs)
dates = map(itemgetter(1), sym_date_pairs)
symbols, dates = zip(*sym_date_pairs)
contracts = await client.get_all_contracts(symbols)
selected = {}
for key, val in contracts.items():