Skip to content

Why does Barcode.build() always return a singleton list? #228

@maresb

Description

@maresb

The return type of Barcode.build() is List[str]. But in all overrides of .build(), the return value is always a singleton. I'm trying to understand the source code, and I find this really confusing, so I was wondering if there's an explanation. Is it for historical / backwards compatibility reasons?

I would have expected the return type to be str, so then I want to understand what lists of different lengths are supposed to mean. Maybe it would be good to at least include an explanatory comment to reduce confusion? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    contributions welcomeFurther design discussions and PRs are welcome.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions