Commit 6d22dba8 by Luc de Jonckheere Committed by GitHub

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>
parent b2732c6e
...@@ -549,3 +549,7 @@ The ``name`` property returns the name of the enum value as a unicode string. ...@@ -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. 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).
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment