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>
This commit is contained in:
Luc de Jonckheere
2023-07-12 08:56:40 -07:00
committed by GitHub
co-authored by Ralf W. Grosse-Kunstleve
parent b2732c6e1a
commit 6d22dba82f
+4
View File
@@ -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).