Skip to content

Commit 056f7e5

Browse files
committed
Enable py::ellipsis on Python 2
1 parent 1caf1d0 commit 056f7e5

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

include/pybind11/pytypes.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -736,9 +736,7 @@ inline bool PyIterable_Check(PyObject *obj) {
736736
}
737737

738738
inline bool PyNone_Check(PyObject *o) { return o == Py_None; }
739-
#if PY_MAJOR_VERSION >= 3
740739
inline bool PyEllipsis_Check(PyObject *o) { return o == Py_Ellipsis; }
741-
#endif
742740

743741
inline bool PyUnicode_Check_Permissive(PyObject *o) { return PyUnicode_Check(o) || PYBIND11_BYTES_CHECK(o); }
744742

@@ -1020,13 +1018,11 @@ class none : public object {
10201018
none() : object(Py_None, borrowed_t{}) { }
10211019
};
10221020

1023-
#if PY_MAJOR_VERSION >= 3
10241021
class ellipsis : public object {
10251022
public:
10261023
PYBIND11_OBJECT(ellipsis, object, detail::PyEllipsis_Check)
10271024
ellipsis() : object(Py_Ellipsis, borrowed_t{}) { }
10281025
};
1029-
#endif
10301026

10311027
class bool_ : public object {
10321028
public:

0 commit comments

Comments
 (0)