Skip to content

docs: clarify custom operator hash normalization scope - #643

Open
ac1982 wants to merge 1 commit into
qlustered:devfrom
ac1982:docs/hash-normalization
Open

ac1982 wants to merge 1 commit into
qlustered:devfrom
ac1982:docs/hash-normalization

Conversation

@ac1982

@ac1982 ac1982 commented Oct 20, 2026

Copy link
Copy Markdown

Related to #606.

Clarify that normalize_value_for_hashing receives individual values independently of the pairwise match() method. Normalizers must check their own type/path scope and return unrelated objects unchanged; an accidental None return can hide differences under ignore_order=True.

Update the API docstring and custom-operator guide, with numeric-list examples showing that the string normalizer preserves unrelated comparisons. Fix the prompts in the same GUID example so it can be executed as a doctest. Runtime behavior is unchanged.

Validation: all 14 doctests in the updated example pass; pytest tests/test_operators.py --cov=deepdiff passes (10 tests); Sphinx HTML build with warnings as errors passes; git diff --check passes. The complete custom-operator page has five remaining pre-existing doctest failures in other examples (eight on the unmodified baseline); a clean whole-page doctest run or full library test suite is not claimed.

AI assistance: developed and validated with OpenAI Codex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant