From 6d22dba82f1789f11a8eb2c2debbcbd4d2d8a969 Mon Sep 17 00:00:00 2001 From: Luc de Jonckheere Date: Wed, 12 Jul 2023 17:56:40 +0200 Subject: [PATCH] Warning on comparing wrapper enums with is (#4732) * Warning on comparing wrapper enums with is * backticks for quoting and link to related issue --------- Co-authored-by: Ralf W. Grosse-Kunstleve --- docs/classes.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/classes.rst b/docs/classes.rst index 52cd52da3..4f2167dac 100644 --- a/docs/classes.rst +++ b/docs/classes.rst @@ -549,3 +549,7 @@ The ``name`` property returns the name of the enum value as a unicode string. ... By default, these are omitted to conserve space. + +.. warning:: + + Contrary to Python customs, enum values from the wrappers should not be compared using ``is``, but with ``==`` (see `#1177 `_ for background).