gh-97933: (PEP 709) inline list/dict/set comprehensions (#101441)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
This commit is contained in:
Carl Meyer 2023-05-09 11:02:14 -06:00 committed by GitHub
parent 0aeda29793
commit c3b595e73e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 1243 additions and 695 deletions

21
Include/opcode.h generated
View file

@ -97,6 +97,7 @@ extern "C" {
#define JUMP_BACKWARD 140
#define LOAD_SUPER_ATTR 141
#define CALL_FUNCTION_EX 142
#define LOAD_FAST_AND_CLEAR 143
#define EXTENDED_ARG 144
#define LIST_APPEND 145
#define SET_ADD 146
@ -146,7 +147,8 @@ extern "C" {
#define LOAD_SUPER_METHOD 263
#define LOAD_ZERO_SUPER_METHOD 264
#define LOAD_ZERO_SUPER_ATTR 265
#define MAX_PSEUDO_OPCODE 265
#define STORE_FAST_MAYBE_NULL 266
#define MAX_PSEUDO_OPCODE 266
#define BINARY_OP_ADD_FLOAT 6
#define BINARY_OP_ADD_INT 7
#define BINARY_OP_ADD_UNICODE 8
@ -202,14 +204,14 @@ extern "C" {
#define STORE_ATTR_INSTANCE_VALUE 111
#define STORE_ATTR_SLOT 112
#define STORE_ATTR_WITH_HINT 113
#define STORE_FAST__LOAD_FAST 143
#define STORE_FAST__STORE_FAST 153
#define STORE_SUBSCR_DICT 154
#define STORE_SUBSCR_LIST_INT 158
#define UNPACK_SEQUENCE_LIST 159
#define UNPACK_SEQUENCE_TUPLE 160
#define UNPACK_SEQUENCE_TWO_TUPLE 161
#define SEND_GEN 166
#define STORE_FAST__LOAD_FAST 153
#define STORE_FAST__STORE_FAST 154
#define STORE_SUBSCR_DICT 158
#define STORE_SUBSCR_LIST_INT 159
#define UNPACK_SEQUENCE_LIST 160
#define UNPACK_SEQUENCE_TUPLE 161
#define UNPACK_SEQUENCE_TWO_TUPLE 166
#define SEND_GEN 167
#define HAS_ARG(op) ((((op) >= HAVE_ARGUMENT) && (!IS_PSEUDO_OPCODE(op)))\
|| ((op) == JUMP) \
@ -218,6 +220,7 @@ extern "C" {
|| ((op) == LOAD_SUPER_METHOD) \
|| ((op) == LOAD_ZERO_SUPER_METHOD) \
|| ((op) == LOAD_ZERO_SUPER_ATTR) \
|| ((op) == STORE_FAST_MAYBE_NULL) \
)
#define HAS_CONST(op) (false\