mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
some doc fix
This commit is contained in:
parent
4e96cce079
commit
458f3c84a6
@ -50,10 +50,10 @@ These two methods are provided for this purpose:
|
|||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
try{
|
try{
|
||||||
PyObject* result = vm->exec("123", "<eval>", EVAL_MODE);
|
CodeObject_ code = vm->compile("a[0]", "main.py", EXEC_MODE, false);
|
||||||
std::cout << py_cast<int>(vm, result); // 123
|
vm->_exec(code, vm->_main);
|
||||||
}catch(Exception& e){
|
}catch(Exception& e){
|
||||||
// use e.summary() to get a summary of the exception
|
// use e.summary() to get a summary of the exception
|
||||||
std::cerr << e.summary() << std::endl;
|
std::cerr << e.summary() << std::endl;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user