2 ms·
My problem with libraries like this in Python is that, because nobody wants to have to hand write semantic validation code, they end up mashing semantics into t
by sevensor 2y ago
My problem with libraries like this in Python is that, because nobody wants to have to hand write semantic validation code, they end up mashing semantics into the parser. What I want is for all the different file formats to be different syntaxes for Data, defined recursively as
Data = str | list[Data] | dict[str, Data]
Leave validation to other libraries. You can get very far simply by reflecting on type annotations.