File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1693,11 +1693,26 @@ codegen_typealias(compiler *c, stmt_ty s)
16931693 return SUCCESS ;
16941694}
16951695
1696+ static bool
1697+ is_const_tuple (asdl_expr_seq * elts )
1698+ {
1699+ for (Py_ssize_t i = 0 ; i < asdl_seq_LEN (elts ); i ++ ) {
1700+ expr_ty e = (expr_ty )asdl_seq_GET (elts , i );
1701+ if (e -> kind != Constant_kind ) {
1702+ return false;
1703+ }
1704+ }
1705+ return true;
1706+ }
1707+
16961708/* Return false if the expression is a constant value except named singletons.
16971709 Return true otherwise. */
16981710static bool
16991711check_is_arg (expr_ty e )
17001712{
1713+ if (e -> kind == Tuple_kind ) {
1714+ return !is_const_tuple (e -> v .Tuple .elts );
1715+ }
17011716 if (e -> kind != Constant_kind ) {
17021717 return true;
17031718 }
You can’t perform that action at this time.
0 commit comments