Tag model entities with their "type"
Closed
requested to merge generated-differential-D3152-source into generated-differential-D3152-target
this aims at preventing constant usage of isinstance() based dispatch code when writing generic code handling model entities.
For example, the "object_type" argument of JournalWriter.write_addition() has become superflous now we only pass model entities, etc.
This idea comes olasd's reading of mypy doc:
https://mypy.readthedocs.io/en/latest/literal_types.html#tagged-unions
Migrated from D3152 (view on Phabricator)
Merge request reports
Activity
Please register or sign in to reply