Updates Python Example get_value to get (#8806)
`get` is the Pythonist way to access a dictionary. Also, `not x` replaces `is None`, since the former translates into is None or empty.
This commit is contained in:
committed by
GitHub
parent
c9c892510a
commit
1d6a5472b0
@@ -42,8 +42,8 @@ class BasicTemplateOptionEquityStrategyAlgorithm(QCAlgorithm):
|
||||
if self.portfolio.invested or not self.is_market_open(self._option_symbol):
|
||||
return
|
||||
|
||||
chain = slice.option_chains.get_value(self._option_symbol)
|
||||
if chain is None:
|
||||
chain = slice.option_chains.get(self._option_symbol)
|
||||
if not chain:
|
||||
return
|
||||
|
||||
grouped_by_expiry = dict()
|
||||
|
||||
Reference in New Issue
Block a user