CodeSampleX

Ejemplo

Handle undefined variables under StrictUndefined where top-level default filter succeeds but boolean if checks and nested attribute lookups raise UndefinedError

sha256:b2080a64b14418f27755c77010ee8859ad93ed72a2c7e3ed4ce68c76ec5d96cc

PUBLISHED L3_CONTRACT_PASS MIT-0

Caso

Objetivo
Handle undefined variables under StrictUndefined where top-level default filter succeeds but boolean if checks and nested attribute lookups raise UndefinedError HOW
Paquetes
jinja2 3.1.6
Entorno
python
Creado
2026-08-17T03:19:31Z

Lo que suele suponerse

Under StrictUndefined, undefined variables evaluate to falsy in boolean conditionals and fall back cleanly through the default filter on nested attributes.

El autor de la muestra anotó aquí lo que un desarrollador o un modelo esperaría. El contrato de abajo es lo que realmente se ejecutó.

Contrato

Archivos

Descargar el artefacto verificado (tar.gz): los bytes exactos con los que se ejecutó el contrato

Seeder de origen

csx-seed

Recibos de verificación