Mercurial > cpython-lru_cache-weakref
annotate Parser/Python.asdl @ 58664:993f703a61ba
Merged revisions 77484,77487,77561,77570,77593,77603,77608,77667,77702-77703,77739,77858,77887,77889 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77484 | skip.montanaro | 2010-01-13 19:12:34 -0600 (Wed, 13 Jan 2010) | 4 lines
Update PyEval_EvalFrame to PyEval_EvalFrameEx. This looks to have been done
partially before. Also add a comment describing how this might have to work
with different versions of the interpreter.
........
r77487 | ezio.melotti | 2010-01-14 05:34:10 -0600 (Thu, 14 Jan 2010) | 1 line
Fixed typo
........
r77561 | georg.brandl | 2010-01-17 02:42:30 -0600 (Sun, 17 Jan 2010) | 1 line
#7699: improve datetime docs: straightforward linking to strftime/strptime section, mark classmethods as such.
........
r77570 | georg.brandl | 2010-01-17 06:14:42 -0600 (Sun, 17 Jan 2010) | 1 line
Add note about usage of STRINGLIB_EMPTY.
........
r77593 | georg.brandl | 2010-01-17 17:33:53 -0600 (Sun, 17 Jan 2010) | 1 line
Fix internal reference.
........
r77603 | benjamin.peterson | 2010-01-18 17:07:56 -0600 (Mon, 18 Jan 2010) | 8 lines
data descriptors do not override the class dictionary if __get__ is not defined
Adjust documentation and add a test to verify this behavior.
See http://mail.python.org/pipermail/python-dev/2010-January/095637.html for
discussion.
........
r77608 | gregory.p.smith | 2010-01-19 02:19:03 -0600 (Tue, 19 Jan 2010) | 6 lines
Do not compile stubs for the sha2 series hashes in the openssl hashlib
module when the openssl version is too old to support them. That
leads both compiled code bloat and to unittests attempting to test
implementations that don't exist for comparison purposes on such
platforms.
........
r77667 | mark.dickinson | 2010-01-21 12:32:27 -0600 (Thu, 21 Jan 2010) | 1 line
Add two more test_strtod test values.
........
r77702 | georg.brandl | 2010-01-23 02:43:31 -0600 (Sat, 23 Jan 2010) | 1 line
#7762: fix refcount annotation of PyUnicode_Tailmatch().
........
r77703 | georg.brandl | 2010-01-23 02:47:54 -0600 (Sat, 23 Jan 2010) | 1 line
#7725: fix referencing issue.
........
r77739 | benjamin.peterson | 2010-01-24 21:52:52 -0600 (Sun, 24 Jan 2010) | 1 line
mention from_float() in error message
........
r77858 | georg.brandl | 2010-01-30 11:57:48 -0600 (Sat, 30 Jan 2010) | 1 line
#7802: fix invalid example (heh).
........
r77887 | georg.brandl | 2010-01-31 12:51:49 -0600 (Sun, 31 Jan 2010) | 5 lines
Fix-up ftplib documentation:
move exception descriptions to toplevel, not inside a class
remove attribution in "versionadded"
spell and grammar check docstring of FTP_TLS
........
r77889 | michael.foord | 2010-01-31 13:59:26 -0600 (Sun, 31 Jan 2010) | 1 line
Minor modification to unittest documentation.
........
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Wed, 03 Feb 2010 02:35:45 +0000 |
| parents | 0704f15b4682 |
| children | 4e24dfedf80c |
| rev | line source |
|---|---|
|
50076
c7abfab4dcdb
Merged revisions 67525-67527,67529,67548-67549,67551-67552,67555,67578,67586,67593-67594,67596,67605-67606,67609,67612,67616-67617,67632,67635,67638 via svnmerge from
Georg Brandl <georg@python.org>
parents:
46231
diff
changeset
|
1 -- ASDL's four builtin types are identifier, int, string, object |
| 35742 | 2 |
|
36703
9f3e58dbea63
Add support for version field on Modules
Martin v. Löwis <martin@v.loewis.de>
parents:
36695
diff
changeset
|
3 module Python version "$Revision$" |
| 35742 | 4 { |
| 5 mod = Module(stmt* body) | |
| 6 | Interactive(stmt* body) | |
| 7 | Expression(expr body) | |
| 8 | |
| 9 -- not really an actual node but useful in Jython's typesystem. | |
| 10 | Suite(stmt* body) | |
| 11 | |
| 12 stmt = FunctionDef(identifier name, arguments args, | |
|
41824
24b60622b944
Merged revisions 55407-55513 via svnmerge from
Guido van Rossum <guido@python.org>
parents:
41717
diff
changeset
|
13 stmt* body, expr* decorator_list, expr? returns) |
|
41226
19f7ff443718
Implement PEP 3115 -- new metaclass syntax and semantics.
Guido van Rossum <guido@python.org>
parents:
40965
diff
changeset
|
14 | ClassDef(identifier name, |
|
19f7ff443718
Implement PEP 3115 -- new metaclass syntax and semantics.
Guido van Rossum <guido@python.org>
parents:
40965
diff
changeset
|
15 expr* bases, |
|
19f7ff443718
Implement PEP 3115 -- new metaclass syntax and semantics.
Guido van Rossum <guido@python.org>
parents:
40965
diff
changeset
|
16 keyword* keywords, |
|
19f7ff443718
Implement PEP 3115 -- new metaclass syntax and semantics.
Guido van Rossum <guido@python.org>
parents:
40965
diff
changeset
|
17 expr? starargs, |
|
19f7ff443718
Implement PEP 3115 -- new metaclass syntax and semantics.
Guido van Rossum <guido@python.org>
parents:
40965
diff
changeset
|
18 expr? kwargs, |
|
41824
24b60622b944
Merged revisions 55407-55513 via svnmerge from
Guido van Rossum <guido@python.org>
parents:
41717
diff
changeset
|
19 stmt* body, |
|
24b60622b944
Merged revisions 55407-55513 via svnmerge from
Guido van Rossum <guido@python.org>
parents:
41717
diff
changeset
|
20 expr *decorator_list) |
| 35742 | 21 | Return(expr? value) |
| 22 | |
| 23 | Delete(expr* targets) | |
| 24 | Assign(expr* targets, expr value) | |
| 25 | AugAssign(expr target, operator op, expr value) | |
| 26 | |
| 27 -- use 'orelse' because else is a keyword in target languages | |
| 28 | For(expr target, expr iter, stmt* body, stmt* orelse) | |
| 29 | While(expr test, stmt* body, stmt* orelse) | |
| 30 | If(expr test, stmt* body, stmt* orelse) | |
|
36695
b6d2f6fd3e11
PEP 343 -- the with-statement.
Guido van Rossum <guido@python.org>
parents:
36666
diff
changeset
|
31 | With(expr context_expr, expr? optional_vars, stmt* body) |
| 35742 | 32 |
|
43102
981ecc526703
Issue #1066: implement PEP 3109, 2/3 of PEP 3134.
Collin Winter <collinw@gmail.com>
parents:
42193
diff
changeset
|
33 | Raise(expr? exc, expr? cause) |
| 35742 | 34 | TryExcept(stmt* body, excepthandler* handlers, stmt* orelse) |
| 35 | TryFinally(stmt* body, stmt* finalbody) | |
| 36 | Assert(expr test, expr? msg) | |
| 37 | |
| 38 | Import(alias* names) | |
|
54918
0704f15b4682
Merged revisions 73376,73393,73398,73400,73404-73405,73409,73419-73421,73432,73457,73460,73485-73486,73488-73489,73501-73502,73513-73514 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
50076
diff
changeset
|
39 | ImportFrom(identifier? module, alias* names, int? level) |
| 35742 | 40 |
| 41 | Global(identifier* names) | |
|
40965
30e5cb3a55ac
Provisional implementation of PEP 3104.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
40940
diff
changeset
|
42 | Nonlocal(identifier* names) |
| 35742 | 43 | Expr(expr value) |
| 44 | Pass | Break | Continue | |
| 45 | |
| 46 -- XXX Jython will be different | |
|
36786
57322cb2ca11
Patch #1440601: Add col_offset attribute to AST nodes.
Martin v. Löwis <martin@v.loewis.de>
parents:
36712
diff
changeset
|
47 -- col_offset is the byte offset in the utf8 string the parser uses |
|
57322cb2ca11
Patch #1440601: Add col_offset attribute to AST nodes.
Martin v. Löwis <martin@v.loewis.de>
parents:
36712
diff
changeset
|
48 attributes (int lineno, int col_offset) |
| 35742 | 49 |
| 50 -- BoolOp() can use left & right? | |
| 51 expr = BoolOp(boolop op, expr* values) | |
| 52 | BinOp(expr left, operator op, expr right) | |
| 53 | UnaryOp(unaryop op, expr operand) | |
| 54 | Lambda(arguments args, expr body) | |
|
36666
6165927431d6
PEP 308 implementation, including minor refdocs and some testcases. It
Thomas Wouters <thomas@python.org>
parents:
36418
diff
changeset
|
55 | IfExp(expr test, expr body, expr orelse) |
| 35742 | 56 | Dict(expr* keys, expr* values) |
|
39693
d0b83c4630c0
SF patch 1547796 by Georg Brandl -- set literals.
Guido van Rossum <guido@python.org>
parents:
39678
diff
changeset
|
57 | Set(expr* elts) |
| 35742 | 58 | ListComp(expr elt, comprehension* generators) |
|
42193
090588a17490
Merged revisions 56154-56264 via svnmerge from
Guido van Rossum <guido@python.org>
parents:
41824
diff
changeset
|
59 | SetComp(expr elt, comprehension* generators) |
|
090588a17490
Merged revisions 56154-56264 via svnmerge from
Guido van Rossum <guido@python.org>
parents:
41824
diff
changeset
|
60 | DictComp(expr key, expr value, comprehension* generators) |
| 35742 | 61 | GeneratorExp(expr elt, comprehension* generators) |
|
36418
a625e8876407
Improved handling of syntax errors.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
35871
diff
changeset
|
62 -- the grammar constrains where yield expressions can occur |
| 35742 | 63 | Yield(expr? value) |
| 64 -- need sequences for compare to distinguish between | |
| 65 -- x < 4 < 3 and (x < 4) < 3 | |
| 66 | Compare(expr left, cmpop* ops, expr* comparators) | |
| 67 | Call(expr func, expr* args, keyword* keywords, | |
| 68 expr? starargs, expr? kwargs) | |
| 69 | Num(object n) -- a number as a PyObject. | |
| 70 | Str(string s) -- need to specify raw, unicode, etc? | |
| 40894 | 71 | Bytes(string s) |
|
39783
7a0ad110e91e
Patch #1550786: ellipsis literal.
Georg Brandl <georg@python.org>
parents:
39782
diff
changeset
|
72 | Ellipsis |
| 35742 | 73 -- other literals? bools? |
| 74 | |
| 75 -- the following expression can appear in assignment context | |
| 76 | Attribute(expr value, identifier attr, expr_context ctx) | |
| 77 | Subscript(expr value, slice slice, expr_context ctx) | |
|
41699
e16c8e5c5ca4
Merged revisions 55225-55227,55229-55269 via svnmerge from
Guido van Rossum <guido@python.org>
parents:
41464
diff
changeset
|
78 | Starred(expr value, expr_context ctx) |
| 35742 | 79 | Name(identifier id, expr_context ctx) |
| 80 | List(expr* elts, expr_context ctx) | |
|
40893
32c4897b5d46
Merged revisions 53623-53858 via svnmerge from
Thomas Wouters <thomas@python.org>
parents:
40788
diff
changeset
|
81 | Tuple(expr* elts, expr_context ctx) |
| 35742 | 82 |
|
36786
57322cb2ca11
Patch #1440601: Add col_offset attribute to AST nodes.
Martin v. Löwis <martin@v.loewis.de>
parents:
36712
diff
changeset
|
83 -- col_offset is the byte offset in the utf8 string the parser uses |
|
57322cb2ca11
Patch #1440601: Add col_offset attribute to AST nodes.
Martin v. Löwis <martin@v.loewis.de>
parents:
36712
diff
changeset
|
84 attributes (int lineno, int col_offset) |
| 35742 | 85 |
| 86 expr_context = Load | Store | Del | AugLoad | AugStore | Param | |
| 87 | |
|
39783
7a0ad110e91e
Patch #1550786: ellipsis literal.
Georg Brandl <georg@python.org>
parents:
39782
diff
changeset
|
88 slice = Slice(expr? lower, expr? upper, expr? step) |
| 35742 | 89 | ExtSlice(slice* dims) |
| 90 | Index(expr value) | |
| 91 | |
| 92 boolop = And | Or | |
| 93 | |
| 94 operator = Add | Sub | Mult | Div | Mod | Pow | LShift | |
| 95 | RShift | BitOr | BitXor | BitAnd | FloorDiv | |
| 96 | |
| 97 unaryop = Invert | Not | UAdd | USub | |
| 98 | |
| 99 cmpop = Eq | NotEq | Lt | LtE | Gt | GtE | Is | IsNot | In | NotIn | |
| 100 | |
| 101 comprehension = (expr target, expr iter, expr* ifs) | |
| 102 | |
| 103 -- not sure what to call the first argument for raise and except | |
|
46231
81ee270a6eb5
Merged revisions 62047 via svnmerge from
Neal Norwitz <nnorwitz@gmail.com>
parents:
43102
diff
changeset
|
104 excepthandler = ExceptHandler(expr? type, identifier? name, stmt* body) |
|
81ee270a6eb5
Merged revisions 62047 via svnmerge from
Neal Norwitz <nnorwitz@gmail.com>
parents:
43102
diff
changeset
|
105 attributes (int lineno, int col_offset) |
| 35742 | 106 |
|
40529
54cd47788811
PEP 3107 - Function Annotations thanks to Tony Lownds
Neal Norwitz <nnorwitz@gmail.com>
parents:
40215
diff
changeset
|
107 arguments = (arg* args, identifier? vararg, expr? varargannotation, |
|
54cd47788811
PEP 3107 - Function Annotations thanks to Tony Lownds
Neal Norwitz <nnorwitz@gmail.com>
parents:
40215
diff
changeset
|
108 arg* kwonlyargs, identifier? kwarg, |
|
54cd47788811
PEP 3107 - Function Annotations thanks to Tony Lownds
Neal Norwitz <nnorwitz@gmail.com>
parents:
40215
diff
changeset
|
109 expr? kwargannotation, expr* defaults, |
|
54cd47788811
PEP 3107 - Function Annotations thanks to Tony Lownds
Neal Norwitz <nnorwitz@gmail.com>
parents:
40215
diff
changeset
|
110 expr* kw_defaults) |
|
41717
9ad84070b22d
Merged revisions 55328-55341 via svnmerge from
Guido van Rossum <guido@python.org>
parents:
41699
diff
changeset
|
111 arg = (identifier arg, expr? annotation) |
| 35742 | 112 |
| 113 -- keyword arguments supplied to call | |
| 114 keyword = (identifier arg, expr value) | |
| 115 | |
| 116 -- import name with optional 'as' alias. | |
| 117 alias = (identifier name, identifier? asname) | |
| 118 } | |
|
40895
bd1419e94773
Touch file to regenerate Python-ast.[ch]
Thomas Wouters <thomas@python.org>
parents:
40894
diff
changeset
|
119 |
