Skip to content

Commit cca6ae1

Browse files
authored
docs: warn about identity instability of unknown status codes in docstring
Update documentation to clarify behavior of synthesized ``UNKNOWN_<code>`` members and their equality checks.
1 parent d3ff3f4 commit cca6ae1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • packages/dexpace-sdk-core/src/dexpace/sdk/core/http/response

packages/dexpace-sdk-core/src/dexpace/sdk/core/http/response/status.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ class Status(IntEnum):
2222
classification (`is_success`, `is_redirect`, ...) and integer comparisons
2323
intact, instead of being discarded. Integers outside 100..599 (for
2424
example ``42`` or ``1000``) remain invalid and raise `ValueError`.
25+
26+
.. note::
27+
Synthesized ``UNKNOWN_<code>`` members are dynamically instantiated and
28+
are not identity-stable across lookups. Always use value equality
29+
(``==``) or band predicates rather than identity checks (``is``).
2530
"""
2631

2732
# 1xx Informational

0 commit comments

Comments
 (0)