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 details)
Built Distribution
File details
Details for the file pygoto-1.0.0.tar.gz
.
File metadata
- Download URL: pygoto-1.0.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | baa57d6b95f350aac574fe0f17c1084160aebaa059f408bf443e941417139c20 |
|
MD5 | 694b232a7eb666010000cf0b13640775 |
|
BLAKE2b-256 | 992300c3df8e86409b998d16bf7b07b6be631abeb15a0d5863dffcdca1af892a |
File details
Details for the file pygoto-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: pygoto-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfa23f6b2516400810c49d2d95f609d6ca98992374f52099bbe4dd0cc1bf918e |
|
MD5 | 89e34b972337fee47374ae8fe8469252 |
|
BLAKE2b-256 | 13bee918e55d3c3abe70e0044219c682378c2e0d195a4654907584b8fcb9e330 |