From f3109d8419b3ed56cf9795f6343ab08b0c27746a Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Sat, 21 Sep 2019 18:09:35 +0200 Subject: [PATCH] future-proof Python version check from commit 31680e6 (@lgritz) --- include/pybind11/pybind11.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index a0e63958..c6237056 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -1566,7 +1566,7 @@ public: #if PY_MAJOR_VERSION < 3 def("__long__", [](Type value) { return (Scalar) value; }); #endif - #if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 8 + #if PY_MAJOR_VERSION > 3 || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 8) def("__index__", [](Type value) { return (Scalar) value; }); #endif