Unfortunately, python is missing the goto keyword. This talk rights this historical wrong by presenting a module that allows the use of goto within a function. An overview of the implementation is provided, along with rationale and performance results. Knowing what a decorator is will be helpful for understanding the technical part of this talk.
goto in Python
- A brief history of the goto statement.
- Why have a goto in Python?
- Previous attempts at goto in Python
- Dynamically rewriting byte codes
- Problematic constructs
- Performance results
- Future work