def requests(self): base_index = self._index self._index += 1 return [ stock_pb2.StockRequest(symbol=SYMBOL_FORMAT % (base_index + index)) for index in range(STREAM_LENGTH) ]
def requests(self): return [ stock_pb2.StockRequest(symbol=SYMBOL_FORMAT % index) for index in range(STREAM_LENGTH) ]
def request(self): symbol = SYMBOL_FORMAT % self._index self._index += 1 return stock_pb2.StockRequest(symbol=symbol, num_trades_to_watch=STREAM_LENGTH)
def request(self): symbol = SYMBOL_FORMAT % self._index self._index += 1 return stock_pb2.StockRequest(symbol=symbol)