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!
The return type of
Barcode.build()isList[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!