Use goto in Python
Project description
Pygoto
Use goto in Python
Installation
From PyPI
pip3 install pygoto
From GitHub
pip3 install git+https://github.com/donno2048/pygoto
Usage / Examples
from goto import goto
flag = False
flag = not flag
print(0)
if flag:
goto(3)
print(1)
0
0
1
from goto import goto
sum = 0
for i in range(10):
sum += i
if i == 5:
goto(7)
print(sum)
15
from goto import goto
def zero(): 1/0
goto(5)
zero()
print("Done!")
Done!
from goto import goto
def zero(): 1/0
goto(4)
zero()
print("Done!")
Traceback (most recent call last):
File "main.py", line 4, in <module>
zero()
File "main.py", line 2, in zero
def zero(): 1/0
ZeroDivisionError: division by zero
from goto import goto
def zero(): 1/0
goto(3)
zero()
print("Done!")
You have passed the recursion limit, please check your goto
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pygoto-1.0.0.tar.gz
(3.0 kB
view hashes)
Built Distribution
pygoto-1.0.0-py3-none-any.whl
(3.2 kB
view hashes)