mirror of
				https://github.com/python/cpython.git
				synced 2025-11-01 06:01:29 +00:00 
			
		
		
		
	SF patch 1547796 by Georg Brandl -- set literals.
This commit is contained in:
		
							parent
							
								
									ecfd0b2f3b
								
							
						
					
					
						commit
						86e58e239e
					
				
					 22 changed files with 229 additions and 72 deletions
				
			
		|  | @ -851,6 +851,7 @@ opcode_stack_effect(int opcode, int oparg) | |||
| 			return 1; | ||||
| 		case BUILD_TUPLE: | ||||
| 		case BUILD_LIST: | ||||
| 		case BUILD_SET: | ||||
| 			return 1-oparg; | ||||
| 		case BUILD_MAP: | ||||
| 			return 1; | ||||
|  | @ -2955,6 +2956,11 @@ compiler_visit_expr(struct compiler *c, expr_ty e) | |||
| 			ADDOP(c, STORE_SUBSCR); | ||||
| 		} | ||||
| 		break; | ||||
| 	case Set_kind: | ||||
| 		n = asdl_seq_LEN(e->v.Set.elts); | ||||
| 		VISIT_SEQ(c, expr, e->v.Set.elts); | ||||
| 		ADDOP_I(c, BUILD_SET, n); | ||||
| 		break; | ||||
| 	case ListComp_kind: | ||||
| 		return compiler_listcomp(c, e); | ||||
| 	case GeneratorExp_kind: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Guido van Rossum
						Guido van Rossum