mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 21:25:13 +00:00
python 2.7 fix for example 5
This commit is contained in:
parent
e6b2f75949
commit
4e27f7bb13
@ -77,7 +77,8 @@ try:
|
|||||||
test_dummy_function(lambda x, y: x + y)
|
test_dummy_function(lambda x, y: x + y)
|
||||||
print("Problem!")
|
print("Problem!")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if 'missing 1 required positional argument' in str(e):
|
if 'missing 1 required positional argument' in str(e) or \
|
||||||
|
'takes exactly 2 arguments' in str(e):
|
||||||
print("All OK!")
|
print("All OK!")
|
||||||
else:
|
else:
|
||||||
print("Problem!")
|
print("Problem!")
|
||||||
|
Loading…
Reference in New Issue
Block a user