8000 Apply suggestions from code review · python/cpython@ffae4e6 · GitHub
[go: up one dir, main page]

Skip to content

Commit ffae4e6

Browse files
carljmiritkatriel
andauthored
Apply suggestions from code review
Co-authored-by: I 8000 rit Katriel <1055913+iritkatriel@users.noreply.github.com>
1 parent 5914d77 commit ffae4e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/compile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,7 @@ compiler_enter_scope(struct compiler *c, identifier name,
12431243
}
12441244
if (u->u_ste->ste_needs_class_closure) {
12451245
/* Cook up an implicit __class__ cell. */
1246-
int res;
1246+
Py_ssize_t res;
12471247
assert(u->u_scope_type == COMPILER_SCOPE_CLASS);
12481248
res = dict_add_o(u->u_metadata.u_cellvars, &_Py_ID(__class__));
12491249
if (res < 0) {
@@ -5006,7 +5006,7 @@ push_inlined_comprehension_state(struct compiler *c, location loc,
50065006
// at all; DEF_LOCAL | DEF_NONLOCAL can occur in the case of an
50075007
// assignment expression to a nonlocal in the comprehension, these don't
50085008
// need handling here since they shouldn't be isolated
5009-
if (symbol & DEF_LOCAL && ~symbol & DEF_NONLOCAL) {
5009+
if (symbol & DEF_LOCAL && !(symbol & DEF_NONLOCAL)) {
50105010
if (c->u->u_ste->ste_type != FunctionBlock) {
50115011
// non-function scope: override this name to use fast locals
50125012
PyObject *orig = PyDict_GetItem(c->u->u_metadata.u_fasthidden, k);

0 commit comments

Comments
 (0)
0