Skip to content

Display String Representation in C# Objects Nested in List #69

@AlexCatarino

Description

@AlexCatarino

Details

The print method in Jupyter doesn't display string from __repr__/__str__ when they are nested in a list:

qb = QuantBook()
tickers = ["ITA", "PPA", "XAR", "DFEN", "SHLD"]
symbols = []

for ticker in tickers:
    symbols.append(qb.AddEquity(ticker, Resolution.Daily).Symbol)

print(symbols)

Displays:

[<QuantConnect.Symbol object at 0x7f9b74b40608>,
 <QuantConnect.Symbol object at 0x7f9b7638ba48>,
 <QuantConnect.Symbol object at 0x7f9b746d7c08>,
 <QuantConnect.Symbol object at 0x7f9b746d71c8>,
 <QuantConnect.Symbol object at 0x7f9b746d7108>]

when it should:

['ITA', 'PPA', 'XAR', 'DFEN', 'SHLD']

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions