We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af8849f commit 2b48df5Copy full SHA for 2b48df5
include/pybind11/cast.h
@@ -1870,7 +1870,14 @@ struct arg_v : arg {
1870
#if !defined(NDEBUG)
1871
, type(type_id<T>())
1872
#endif
1873
- { }
+ {
1874
+ // Workaround! See:
1875
+ // https://github.com/pybind/pybind11/issues/2336
1876
+ // https://github.com/pybind/pybind11/pull/2685#issuecomment-731286700
1877
+ if (PyErr_Occurred()) {
1878
+ PyErr_Clear();
1879
+ }
1880
1881
1882
public:
1883
/// Direct construction with name, default, and description
0 commit comments