Skip to content

uwuzote/goto.py

Repository files navigation

goto.py

For chads

Have you ever felt anger, because you have to write in soy languages, not chad c?

Now you can cope with it, introducing goto syntax in Python programming language:

from goto import *;

@label
def init():
    global i;
    i = 0;
@label
def loop():
    global i;
    print("%d: Hello, World!" % i);
    i = i + 1;
    goto("loop", i <= 10);
@label
def end():
    print("Done!");

For motivation see ./motivation.md.

For examples see ./example-complex-loop.py, ./example-example-nonexistent-label.py.


Thanks @Tsoding for inspiration: 'I implemented Goto in OCaml' video.

For real-world use consider other implementations of goto in Python:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages