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
Metadata
Release files for pygoto 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pygoto-1.0.2.tar.gz | 2.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pygoto-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.1 kB
Release files / pygoto-1.0.2.tar.gz
| Download URL | pygoto-1.0.2.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96bd937bcf8c72804a7b1a2a851638111ee8c09e25f28ab32995443b5bf01c76
|
|
BLAKE2b-256 checksum How to use checksums |
8914a895bf16c42119117cf2f47bc07d04b3125b36e901aa4cb67986334a85b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|
Release files / pygoto-1.0.2-py3-none-any.whl
| Download URL | pygoto-1.0.2-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6a9661e0c87b0426e0fe7462f8f192102cb42c83c7f4e53921cdd7ab6cb0d303
|
|
BLAKE2b-256 checksum How to use checksums |
17e5c70e584de1afc083fad00f3cb2f445a70911042ae20124d58432989aaecd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|