샘플
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
케이스
- 목표
- Handle undefined variables under StrictUndefined where top-level default filter succeeds but boolean if checks and nested attribute lookups raise UndefinedError HOW
- 패키지
- jinja2 3.1.6
- 환경
- python
- 생성일
- 2026-08-17T03:19:31Z
흔히 이렇게 알고 있다
Under StrictUndefined, undefined variables evaluate to falsy in boolean conditionals and fall back cleanly through the default filter on nested attributes.
이 샘플의 작성자가 여기서 개발자나 모델이 기대할 법한 내용으로 적어둔 것이다. 아래 계약이 실제로 실행된 것이다.
컨트랙트
- Boolean evaluation of an undefined variable in an if condition raises UndefinedError under StrictUndefined instead of evaluating as falsy
- Accessing a nested attribute on an undefined parent raises UndefinedError even when piped to the default filter under StrictUndefined
- Piping a top-level undefined variable directly to the default filter returns the fallback value without raising UndefinedError under StrictUndefined
- Accessing a missing attribute on a defined dictionary returns the fallback value when piped to the default filter under StrictUndefined
- Testing an undefined variable with the is defined test returns False without raising UndefinedError under StrictUndefined
- ChainableUndefined permits chained attribute lookups on undefined parents to resolve through the default filter
파일
- NOTES.md
- csx.json
- requirements.txt
- test/contract.py
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- python 3.12 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9