diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-03-17 21:41:08 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-17 21:41:08 (GMT) |
commit | 6b97598fb66a08d0f36e4d73bffea5c1b17740d4 (patch) | |
tree | 5fb1922e733a71ad26788b1d5f3f9575ca015600 /Python/ast.c | |
parent | dab8423d220243efabbbcafafc12d90145539b50 (diff) | |
download | cpython-6b97598fb66a08d0f36e4d73bffea5c1b17740d4.zip cpython-6b97598fb66a08d0f36e4d73bffea5c1b17740d4.tar.gz cpython-6b97598fb66a08d0f36e4d73bffea5c1b17740d4.tar.bz2 |
bpo-39988: Remove ast.AugLoad and ast.AugStore node classes. (GH-19038)
Diffstat (limited to 'Python/ast.c')
-rw-r--r-- | Python/ast.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/Python/ast.c b/Python/ast.c index 1c1395f..2e9a8d0 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -71,10 +71,6 @@ expr_context_name(expr_context_ty ctx) return "Store"; case Del: return "Del"; - case AugLoad: - return "AugLoad"; - case AugStore: - return "AugStore"; default: Py_UNREACHABLE(); } @@ -1099,14 +1095,7 @@ set_context(struct compiling *c, expr_ty e, expr_context_ty ctx, const node *n) { asdl_seq *s = NULL; - /* The ast defines augmented store and load contexts, but the - implementation here doesn't actually use them. The code may be - a little more complex than necessary as a result. It also means - that expressions in an augmented assignment have a Store context. - Consider restructuring so that augmented assignment uses - set_context(), too. - */ - assert(ctx != AugStore && ctx != AugLoad); + /* Expressions in an augmented assignment have a Store context. */ switch (e->kind) { case Attribute_kind: |