假如:#50# S3=...........(一个赋值行为)#60# for............(这里有个三重循环)##三重循环结束##if ((L-1)==0):L=0goto 60··else:if (S3>S2):goto 50
2 回答

噜噜哒
TA贡献1784条经验 获得超7个赞

慕田峪9158850
TA贡献1794条经验 获得超7个赞
使用如下例:
1 from goto import *
2
3 @patch
4 def f2():
5 goto(10)
6 print 'should not see this'
7 label(10)
8 for i in range(1,99999):
9 print i
10 if i == 5:
11 goto('out')
12 label('out')
13
14 f2()
用法是:
1. from goto import *。注意暂时不支持import goto,不是不能实现,是暂时没时间写。
2.对需要使用goto的函数,前面加个@patch
3.用label(x)和goto(x)的形式写label和goto。x可以是数字或字符串。
goto模块的代码如下:
goto.py
- 2 回答
- 0 关注
- 90 浏览
添加回答
举报
0/150
提交
取消