Martin Panter
69332c1a64
Fix spelling and grammar in documentation and code comments
10 years ago
Berker Peksag
094c9c921c
Issue #23275 : Allow () = iterable assignment syntax
Documentation updates by Martin Panter.
10 years ago
Benjamin Peterson
9d66d4af06
remove unused c_encoding struct member
10 years ago
Benjamin Peterson
768921cf33
rewrite parsestr() so it's comprehensible; remove dead code
10 years ago
Benjamin Peterson
202803a0c0
c_encoding can never be NULL, which allows some code simplification
10 years ago
Victor Stinner
be59d1489b
Issue #26146 : enhance ast.Constant error message
Mention the name of the invalid type in error message of AST validation for
constants.
Suggestion made by Joseph Jevnik on a review.
10 years ago
Victor Stinner
726f6902ce
Fix a refleak in validate_constant()
Issue #26146 .
10 years ago
Victor Stinner
f2c1aa1661
Add ast.Constant
Issue #26146 : Add a new kind of AST node: ast.Constant. It can be used by
external AST optimizers, but the compiler does not emit directly such node.
An optimizer can replace the following AST nodes with ast.Constant:
* ast.NameConstant: None, False, True
* ast.Num: int, float, complex
* ast.Str: str
* ast.Bytes: bytes
* ast.Tuple if items are constants too: tuple
* frozenset
Update code to accept ast.Constant instead of ast.Num and/or ast.Str:
* compiler
* docstrings
* ast.literal_eval()
* Tools/parser/unparse.py
10 years ago
Georg Brandl
5c60ea3fa1
Fix two instances of wrong indentation.
10 years ago
Serhiy Storchaka
2d06e84455
Issue #25923 : Added the const qualifier to static constant arrays.
10 years ago
Victor Stinner
f9827ea618
Issue #25555 : Fix parser and AST: fill lineno and col_offset of "arg" node when
compiling AST from Python objects.
10 years ago
Victor Stinner
c106c68aeb
Issue #25555 : Fix parser and AST: fill lineno and col_offset of "arg" node when
compiling AST from Python objects.
10 years ago
Martin Panter
c2432f6edb
One more typo in a comment
10 years ago
Benjamin Peterson
58b53953f8
make opening brace of container literals and comprehensions correspond to the line number and col offset of the AST node ( closes #25131 )
10 years ago
Eric V. Smith
1e5fcc3dea
Fixed error creation if the problem is an empty expression in an f-string: use ast_error instead of PyErr_SetString.
10 years ago
Eric V. Smith
1d44c41b0c
Move f-string compilation of the expression earlier, before the conversion character and format_spec are checked. This allows for error messages that more closely match what a user would expect.
10 years ago
Eric V. Smith
5567f89c6f
Issue #24779 : Remove unused rawmode parameter to unicode_decode.
10 years ago
Eric V. Smith
235a6f0984
Issue #24965 : Implement PEP 498 "Literal String Interpolation". Documentation is still needed, I'll open an issue for that.
10 years ago
Victor Stinner
00723e0353
Fix ast_for_atom()
Clear PyObject_Str() exception if it failed, ast_error() should not be called
with an exception set.
10 years ago
Yury Selivanov
b3d531348c
Issue #24975 : Fix AST compilation for PEP 448 syntax.
10 years ago
Eric V. Smith
163b5c668d
Fix a trivial typo.
11 years ago
Robert Collins
df395991f6
Issue #9232 : Support trailing commas in function declarations.
For example, "def f(*, a = 3,): pass" is now legal.
Patch from Mark Dickinson.
11 years ago
Yury Selivanov
14acf5f41d
Issue #24791 : Fix grammar regression for call syntax: 'g(*a or b)'.
11 years ago
Yury Selivanov
7544508f02
PEP 0492 -- Coroutines with async and await syntax. Issue #24017 .
11 years ago
Benjamin Peterson
025e9ebd0a
PEP 448: additional unpacking generalizations ( closes #2292 )
Patch by Neil Girdhar.
11 years ago
Victor Stinner
0c39b1b970
Initialize variables to prevent GCC warnings
11 years ago
Benjamin Peterson
7a66fc22ad
revert lineno and col_offset changes from #16795 ( closes #21295 )
11 years ago
Benjamin Peterson
d51374ed78
PEP 465: a dedicated infix operator for matrix multiplication ( closes #21176 )
12 years ago
Benjamin Peterson
0714b8b6ab
set line and column numbers for keyword-only arg nodes ( closes #20619 )
12 years ago
Benjamin Peterson
e84fde981d
set line and column numbers for keyword-only arg nodes ( closes #20619 )
12 years ago
Serhiy Storchaka
c679227e31
Issue #1772673 : The type of `char*` arguments now changed to `const char*`.
12 years ago
Antoine Pitrou
d01d396e7f
Issue #4555 : All exported C symbols are now prefixed with either "Py" or "_Py".
("make smelly" now clean)
12 years ago
Victor Stinner
14e461d5b9
Close #11619 : The parser and the import machinery do not encode Unicode
filenames anymore on Windows.
13 years ago
Christian Heimes
72f562f719
Fix potential NULL pointer dereferencing in ast module
CID 719690
13 years ago
Victor Stinner
0fae8f9083
Issue #18408 : Fix ast_for_atom(), PyErr_Fetch(&type, &value, &tback) can set value to NULL
13 years ago
Victor Stinner
43d8195a70
Issue #18408 : Handle PyArena_AddPyObject() failure in ast.c
PyList_Append() (called by PyArena_AddPyObject()) can fail because of a
MemoryError for example.
13 years ago
Benjamin Peterson
aad1d87339
move declaration to top of block
13 years ago
Benjamin Peterson
cda75be02a
unify some ast.argument's attrs; change Attribute column offset ( closes #16795 )
Patch from Sven Brauch.
13 years ago
Serhiy Storchaka
5e61f14c6d
Issue #12983 : Bytes literals with invalid \x escape now raise a SyntaxError
and a full traceback including line number.
13 years ago
Antoine Pitrou
4de7457009
Issue #17173 : Remove uses of locale-dependent C functions (isalpha() etc.) in the interpreter.
I've left a couple of them in: zlib (third-party lib), getaddrinfo.c
(doesn't include Python.h, and probably obsolete), _sre.c (legitimate
use for the re.LOCALE flag).
13 years ago
Benjamin Peterson
442f20996d
create NameConstant AST class for None, True, and False literals ( closes #16619 )
13 years ago
Mark Dickinson
b1cc6aa2df
Issue #9011 : AST creation no longer modifies CST for negated numeric literals.
13 years ago
Mark Dickinson
ded35aeb9d
Issue #16546 : make ast.YieldFrom argument mandatory.
13 years ago
Christian Heimes
3d463393bb
Fixed memory leak in error branch of parsestrplus. CID 715374 Variable s going out of scope leaks the storage it points to.
13 years ago
Benjamin Peterson
c7dedb0945
put * in the normal place
14 years ago
Benjamin Peterson
bd0df50fb6
get rid of ast_error_finish by passing the compiling struct to ast_error
14 years ago
Benjamin Peterson
c5d7518a2e
move variable decl to the top of the function
14 years ago
Benjamin Peterson
2e2c903700
prevert ast errors from being normalized before ast_error_finish is called ( closes #15846 )
14 years ago
Stefan Krah
28a2ad556a
Check return value of asdl_seq_new(). Found by Coverity.
14 years ago
Benjamin Peterson
3f3584695e
kill this disabled code
14 years ago