mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Merge ast-branch to head
This change implements a new bytecode compiler, based on a transformation of the parse tree to an abstract syntax defined in Parser/Python.asdl. The compiler implementation is not complete, but it is in stable enough shape to run the entire test suite excepting two disabled tests.
This commit is contained in:
parent
2cb94aba12
commit
3e0055f8c6
54 changed files with 13675 additions and 6810 deletions
|
@ -1559,11 +1559,11 @@ Run the debugger on the docstring, and then restore sys.stdin.
|
|||
|
||||
>>> try: doctest.debug_src(s)
|
||||
... finally: sys.stdin = real_stdin
|
||||
> <string>(1)?()
|
||||
> <string>(1)<module>()
|
||||
(Pdb) next
|
||||
12
|
||||
--Return--
|
||||
> <string>(1)?()->None
|
||||
> <string>(1)<module>()->None
|
||||
(Pdb) print x
|
||||
12
|
||||
(Pdb) continue
|
||||
|
@ -1601,7 +1601,7 @@ def test_pdb_set_trace():
|
|||
>>> try: runner.run(test)
|
||||
... finally: sys.stdin = real_stdin
|
||||
--Return--
|
||||
> <doctest foo[1]>(1)?()->None
|
||||
> <doctest foo[1]>(1)<module>()->None
|
||||
-> import pdb; pdb.set_trace()
|
||||
(Pdb) print x
|
||||
42
|
||||
|
@ -1637,7 +1637,7 @@ def test_pdb_set_trace():
|
|||
(Pdb) print y
|
||||
2
|
||||
(Pdb) up
|
||||
> <doctest foo[1]>(1)?()
|
||||
> <doctest foo[1]>(1)<module>()
|
||||
-> calls_set_trace()
|
||||
(Pdb) print x
|
||||
1
|
||||
|
@ -1686,7 +1686,7 @@ def test_pdb_set_trace():
|
|||
[EOF]
|
||||
(Pdb) next
|
||||
--Return--
|
||||
> <doctest foo[2]>(1)?()->None
|
||||
> <doctest foo[2]>(1)<module>()->None
|
||||
-> f(3)
|
||||
(Pdb) list
|
||||
1 -> f(3)
|
||||
|
@ -1779,7 +1779,7 @@ def test_pdb_set_trace_nested():
|
|||
(Pdb) print y
|
||||
1
|
||||
(Pdb) up
|
||||
> <doctest foo[1]>(1)?()
|
||||
> <doctest foo[1]>(1)<module>()
|
||||
-> calls_set_trace()
|
||||
(Pdb) print foo
|
||||
*** NameError: name 'foo' is not defined
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue