Skip to content

Comment on A function decorator that rewrites the bytecode to enable goto in Pythonparent

Comments

They're not set up in the most elegant way, but the concept of leaving a nested loop is very simple and should definitely be possible without a goto. And switching between states in a state machine, where each state has a single entrance like a normal function, should also be simple.

With goto you can't know at a glance if the code is following those patterns or doing some kind of spaghetti nonsense. It hurts readability.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.