mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-21 12:45:11 +00:00
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:
parent
b2732c6e1a
commit
6d22dba82f
@ -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).
|
||||
|
Loading…
Reference in New Issue
Block a user