mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
bpo-40334: PEP 617 implementation: New PEG parser for CPython (GH-19503)
Co-authored-by: Guido van Rossum <guido@python.org> Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
This commit is contained in:
parent
a81849b031
commit
c5fc156852
91 changed files with 27057 additions and 146 deletions
|
@ -10,6 +10,7 @@
|
|||
import ast
|
||||
import types
|
||||
import decimal
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
a_global = 'global variable'
|
||||
|
@ -205,7 +206,8 @@ f'{a * f"-{x()}-"}'"""
|
|||
call = binop.right.values[1].value
|
||||
self.assertEqual(type(call), ast.Call)
|
||||
self.assertEqual(call.lineno, 3)
|
||||
self.assertEqual(call.col_offset, 11)
|
||||
if not sys.flags.use_peg:
|
||||
self.assertEqual(call.col_offset, 11)
|
||||
|
||||
def test_ast_line_numbers_duplicate_expression(self):
|
||||
"""Duplicate expression
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue