Datasette currently has a few API internals that return sqlite3.Row objects. I was thinking about how this might work in the future - if Datasette ever expands beyond SQLite (plugin-provided backends for PostgreSQL and DuckDB for example) I'd want a way to return data from other stores using objects that behave like sqlite3.Row but are not exactly that class.
and I already explained that
Union
is a thing.I’m not sure you understand that what a union does or does not do is completely irrelevant and besides the point. Python’s protocols add support for structural subtyping, and enable both runtime and build-time type checks without requiring major code changes. Don’t you understand what that means?