mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
b20b5f1bb5
* restore __pika_ooc.h * raise in cmodule and py function is ok * add trydef1.py * add PIKA_ASSERT_ENABLE config, add try_info
15 lines
225 B
Python
15 lines
225 B
Python
def tryfn(a):
|
|
if a == 1:
|
|
print('a:1')
|
|
raise
|
|
print('a:1,after raise')
|
|
return
|
|
if a == 0:
|
|
print('a:0')
|
|
return
|
|
try:
|
|
tryfn(1)
|
|
tryfn(0)
|
|
except:
|
|
print('in except')
|