vliz-be-opsci / pysubyt

python module for Linked Data production (aka semantic uplifting) through Templating
MIT License
0 stars 0 forks source link

add support for chainable undefined #39

Open marc-portier opened 2 years ago

marc-portier commented 2 years ago

looking at https://github.com/pallets/jinja/pull/997 (as found in https://stackoverflow.com/questions/19614027/jinja2-template-variable-if-none-object-set-a-default-value)

we could be adding the ChainableUndefined to allow for flexible template-writing that introduces _.top.sub | default('if top or sub where not there') in stead of requiring template-writers to be doing lots of protective if exists testing