aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc de Jonckheere <lsdejonckheere@gmail.com>2023-07-12 17:56:40 +0200
committerGitHub <noreply@github.com>2023-07-12 08:56:40 -0700
commit6d22dba82f1789f11a8eb2c2debbcbd4d2d8a969 (patch)
tree09353bce9a996c29b16dc9dbe0bd0bc7eb0c8719
parentb2732c6e1a96eb97e79359c049871c41e2cd34c8 (diff)
downloadpybind11-6d22dba82f1789f11a8eb2c2debbcbd4d2d8a969.tar.gz
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 <rwgk@google.com>
-rw-r--r--docs/classes.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/classes.rst b/docs/classes.rst
index 52cd52da..4f2167da 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 <https://github.com/pybind/pybind11/issues/1177>`_ for background).