Jakub Wilk
7a2348e4cc
Fix typos
2024-01-19 23:20:13 +01:00
rocky
20af515dda
Handle comprehensions inside a lambda
2023-08-11 12:13:46 -04:00
rocky
ddeb5af6d6
compare_chained2 _> compare_chained_right
2023-07-29 12:09:25 -04:00
rocky
c01ab5e001
Tweaks to long-literal handling...
...
* Use version tuple comparison for version testing
* small lintin of n_actions
* revise test so assert is not removed in 3.8
2023-04-19 02:08:36 -04:00
Andre Eberle
4d420e2e37
Typo in comments
2023-04-17 19:26:35 -04:00
Andre Eberle
d1ef91dd49
Added tests for issue #439 , global/const issues
2023-04-17 19:20:37 -04:00
rocky
ad00b9a4ee
Use xdis pattr extraction for LOAD_NAME
2023-04-15 07:31:35 -04:00
rocky
154dabfcef
Handle Python 3.4 MAKE_CLOSURE fns ...
...
Is done just like Python 3.3
2023-01-14 09:54:48 -05:00
rocky
5b3ea47bac
Correct long-literals for Python 2.7
2022-10-16 19:33:51 -04:00
rocky
bb9b9fb4b3
Improve "if/else" in "for" test
2022-10-16 18:24:48 -04:00
Berbe
512c500810
Add: Tests: CONTINUE in else block in a for loop
2022-10-10 20:33:19 +02:00
rocky
600688a65d
Sync with decompyle3
2022-09-17 10:54:09 -04:00
rocky
4260deea11
Tidy ifelsemstmt check
2022-08-29 05:46:46 -04:00
R. Bernstein
200250df56
Merge pull request #406 from tangboxuan/master
...
Fix offset of extended argument instruction
2022-08-24 05:51:41 -04:00
Bo Xuan
2f3b5e53d4
Add test case
2022-08-24 16:19:39 +08:00
rocky
21b4d52a77
Correct 2.6 erroneous ifelse detection
2022-08-23 16:50:50 -04:00
rocky
5a4136a7f6
Some limited support for 3.8 "=" specifier
2022-07-06 13:00:52 -04:00
rocky
85ba8352ba
Port over some recent decompyle3 3.8 fixes
2022-06-26 04:26:15 -04:00
rocky
7f798541f0
Python 3.8 while and whileTrue loops
2022-06-16 15:42:51 -04:00
rocky
fa9cc4c669
Correct 2.5-7 relative import formatting
2022-05-14 19:35:24 -04:00
rocky
9b80663529
3.6 async hacking
2022-05-07 07:01:39 -04:00
rocky
8576117d00
Fix More 3.6 async parsing
...
... all from 3.6 test_coroutines.py.
More bugs remain
2022-05-05 07:36:06 -04:00
rocky
eba0d37d0f
Improve Python 1.x decompiling
...
Still has bugs, but is much better.
2022-04-30 05:54:22 -04:00
rocky
37ea469ce6
One more 2.4 test
2022-04-28 17:11:17 -04:00
rocky
e564ac3ab1
Go over long-literal test
2022-04-24 17:50:32 -04:00
rocky
8cdf741b62
Bugs in long-literal handlin
...
Move n_dict to n_actions and special case n_const_list.
Generalize build_collection out of 3.7+ and into all Pythons
2022-04-24 17:38:35 -04:00
rocky
371138cfbc
handle long literal constants faster
2022-04-24 13:11:20 -04:00
rocky
f3ac70d0ea
test tweak again
2022-04-21 05:34:15 -04:00
rocky
c88d9de316
Correct 3.7 "impor"t and "from .. import"
2022-04-20 20:03:28 -04:00
rocky
04510ac2f8
lambda formatting in f-string
...
In a formatted string using "lambda', we should not add "\n".
For example in:
f'{(lambda x:x)("8")!r}'
Adding a "\n" after "lambda x: x" will give an error message:
SyntaxError: f-string expression part cannot include a backslash
2022-04-12 16:49:58 -04:00
rocky
a1fe069c8c
Handle walrus operator
...
Or rather set precedence on call_stmt and expr_stmt
Adjust pytest test_single_compile so it works now
2022-04-12 05:21:13 -04:00
rocky
bc71bf7acd
Shorten 10_complex.py
...
Runtime testing took too long because ranges were larger than needed
Also use newer convention for marking runable codes
2022-04-03 06:41:58 -04:00
rocky
219cb0606a
MAKE_FUNCTION_8 -> MAKE_FUNCTION_CLOSURE
...
Clarity is important.
2022-02-27 10:29:53 -05:00
rocky
deea74b6a8
ret_expr -> return_expr
...
This matches Python's AST a little more closely
2022-01-03 21:56:07 -05:00
rocky
203139eafa
Add tests, comment what's up with change..
...
and use isinstance()
2021-12-31 11:27:15 -05:00
rocky
3234673422
mklambda -> lambda_body matches Python AST better
...
Note: we can't use "lambda" since that is a reserved word
2021-12-26 18:48:51 -05:00
rocky
da2314f5ae
Part of the decompye3 loop "continue" fixes
2021-12-17 16:13:09 -05:00
rocky
2d5249f1d3
Small comment change
2021-11-23 07:31:37 -05:00
rocky
211c74c240
Better 3.7 CALL_METHOD_KW handling
...
- Handles positional args now
2021-11-23 05:06:48 -05:00
rocky
2ed211e0d4
Some PyPY 3.7 support
...
* Handle CALL_METHOD_KW
* adjust PyPY 3.7 assert stmts
* misc administrivia
2021-11-21 14:04:34 -05:00
R. Bernstein
9b5d953614
Merge pull request #364 from rocky/PYTHON3-move
...
use xdis.PYTHON3 not uncompyle.PYTHON3
2021-11-03 01:24:47 -04:00
Markus Elfring
05761b0d46
Issue #363 : Convert 14 statements to the usage of augmented assignments
...
Augmented assignment statements became available with Python 2.
https://docs.python.org/3/whatsnew/2.0.html#augmented-assignment
Thus adjust 14 source code places accordingly.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net >
2021-11-02 11:25:04 +01:00
rocky
96b1e435c2
Fixes #360
2021-06-15 22:42:55 -04:00
Tim Gates
fc38e23d8f
docs: fix simple typo, unecessary -> unnecessary
...
There is a small typo in test/simple_source/looping/12_if_while_true_pass.py.
Should read `unnecessary` rather than `unecessary`.
2020-12-31 18:11:41 +11:00
rocky
8879708da7
del_stmt -> delete to match Python AST better
2020-09-02 07:14:56 -04:00
rocky
a215ee2f00
Use "co_consts" in docstring detection.
...
Note: this is an upheaval because we need to pass "code" or at least
"code.co_consts" to the docstring detection routine
2020-07-21 10:31:07 -04:00
rocky
0f80c38530
Better doc string detection
...
A bug in 2.7 test_descr.py revealed a problem with the way we were
detecting docstrings.
__doc__ = DocDescr()
was getting confused with a docstring.
This program also reveals other bugs in 3.2+ but we'll deal with that
in another commit.
2020-07-19 20:31:50 -04:00
rocky
54932d36fa
Small tweaks...
...
add-test.py: wasn't handling optimize correctly. Handle python version better
parse27.py: dyslexia
01_for_else_try_else.py: bug in found in 1.4 anydbm.py which we will
address soon
2020-07-06 18:19:06 -04:00
rocky
e14675c2dc
Handle 3.7+ "else" branch removal...
...
As seen in _cmp() of python3.8/distutils/version.py with optimization -O2
2020-06-12 13:18:33 -04:00
rocky
acdd025162
ast-check "for" is a loop; sync "withas" test ..
...
with decompyle3.
2020-06-04 05:34:19 -04:00