Skip to content

Add support for goto into blocks. #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 53 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
c5a1271
Properly fix `Jump out of too many nested blocks` error
insignification Dec 10, 2019
8b431a2
Rename new SyntaxError to be more descriptive in case ever encountered.
Dec 10, 2019
2b155c1
Refactor previous changes to avoid duplication & fix safety issues
Dec 12, 2019
66f0dee
Added python 3.8 support
Dec 12, 2019
8db2498
Fix test_jump_out_of_try_block_and_survive.
Dec 13, 2019
4c81128
Avoid patching code again and again in nested functions
Dec 13, 2019
536b16e
Fix previous change for python2.6 (doesn't support Code weakrefs)
Dec 13, 2019
42b5518
Fix with blocks (add tests)
Dec 13, 2019
2bf1e42
Support jumping out of except & finally blocks!
Dec 13, 2019
9b8dd65
Add combined try/catch/finally test and remove unneccessary op
Dec 13, 2019
900317a
Support jumping into 'for' blocks with extend 'into' syntax
Dec 13, 2019
b0361b5
Amend previous commit...
Dec 13, 2019
d273711
More tests
Dec 13, 2019
2312a3f
Add and fix tests for cross-loop jumping with params
Dec 13, 2019
d78a7b3
Added jump into except/finally blocks
Dec 13, 2019
7de176d
Added goto to try block & fix py26 goto out of with bug
Dec 13, 2019
d52c7e0
And finally(?), jump into with support!
Dec 13, 2019
a75a912
Added support to goto.param flavor & fix stupid bug with with.
Dec 13, 2019
ee35b2a
Various style updates per initial comments
Dec 13, 2019
c1613f5
Style & test updates (other updates to commit in following commits)
Dec 13, 2019
df40382
Refactor the ops sizing/writing to avoid code duplication
Dec 13, 2019
fedd2cb
Added python 3.8 support
Dec 12, 2019
5133d8c
Updated style & added py38 to tox/travis/readme
Dec 14, 2019
2d9047c
fix line endings snafu (you'll squash anyway, so I'm keeping history)
Dec 14, 2019
281cc1c
Remove the commented out tests (They'll come back in the next PR).
Dec 14, 2019
1e28f0f
Merge branch 'master' into py38
insignification Dec 14, 2019
e26a2d0
Refactor previous changes to avoid duplication & fix safety issues
Dec 12, 2019
5a8064d
Fix test_jump_out_of_try_block_and_survive.
Dec 13, 2019
3055aa7
Avoid patching code again and again in nested functions
Dec 13, 2019
16ad693
Fix previous change for python2.6 (doesn't support Code weakrefs)
Dec 13, 2019
5b7eb5a
Fix with blocks (add tests)
Dec 13, 2019
26efae6
Support jumping out of except & finally blocks!
Dec 13, 2019
2674255
Add combined try/catch/finally test and remove unneccessary op
Dec 13, 2019
28a3d87
Fixed two dumb bugs that cancelled each other out in most cases
Dec 13, 2019
0419965
Fix jumping out of with blocks in py26 (and added test)
Dec 13, 2019
ac926dc
Update merge
Dec 14, 2019
599edb9
Added while / while true tests & fix code to make them pass
Dec 14, 2019
8dbdc21
Merge branch 'fix2' into into
Dec 14, 2019
65eed29
Comment new tests back in - they already pass
Dec 14, 2019
3561997
Fix jump into while loop (& with), simplify code
Dec 14, 2019
a980b6c
elif for consistentcy
Dec 14, 2019
46a1d6b
Merge branch 'master' into fix2
insignification Dec 15, 2019
bbb4b21
Merge branch 'master' into fix2
insignification Dec 15, 2019
cf0bccf
Style fixes
Dec 15, 2019
e3c23ce
Added tests that show remaining issues, first part of fixing them.
Dec 15, 2019
0835958
Backport change from 'iter' needed for the newly added tests
Dec 15, 2019
7d48292
Refactor _find_labels_and_gotos to use a class instead of nested funcs
Dec 15, 2019
c9fe97f
Avoid __pypy__ import and instead always call END_FINALLY when possible
Dec 15, 2019
27a27ba
Go a step further and always call END_FINALLY - make it possible in 3.8
Dec 15, 2019
bf3076f
flakate
Dec 15, 2019
e9480ff
Update comment
Dec 15, 2019
72e79f9
Merge branch 'fix2' into into
Dec 15, 2019
bc40d4e
Merge...
Dec 15, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ python:
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "pypy"
- "pypy3"

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Pypi Entry](https://badge.fury.io/py/goto-statement.svg)](https://pypi.python.org/pypi/goto-statement)

A function decorator to use `goto` in Python.
Tested on Python 2.6 through 3.7 and PyPy.
Tested on Python 2.6 through 3.8 and PyPy.

[![](https://imgs.xkcd.com/comics/goto.png)](https://xkcd.com/292/)

Expand Down
Loading