python-goto:一个函数修饰器,重写字节码,以在Python中启用goto

时间:2021-05-08 11:55:13
【文件属性】:
文件名称:python-goto:一个函数修饰器,重写字节码,以在Python中启用goto
文件大小:8KB
文件格式:ZIP
更新时间:2021-05-08 11:55:13
Python 去 在Python中使用goto函数修饰器。 在Python 2.6到3.7和PyPy上进行了测试。 安装 pip install goto-statement 用法 from goto import with_goto @ with_goto def range ( start , stop ): i = start result = [] label . begin if i == stop : goto . end result . append ( i ) i += 1 goto . begin label . end return result 执行 请注意, label .begin和goto .begin是常规的Python语法,用于从变量名称为label and goto的对象begi
【文件预览】:
python-goto-master
----MANIFEST.in(47B)
----.travis.yml(562B)
----tox.ini(365B)
----LICENSE(1KB)
----setup.cfg(26B)
----setup.py(926B)
----README.md(4KB)
----goto.py(7KB)
----test_goto.py(4KB)
----.gitignore(51B)

网友评论