File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change 370370Traceback (most recent call last): 
371371SyntaxError: invalid syntax 
372372
373- >>> match ...: 
374- ...     case {**rest, "key": value}: 
375- ...        ... 
376- Traceback (most recent call last): 
377- SyntaxError: invalid syntax 
378- 
379373>>> match ...: 
380374...     case {**_}: 
381375...        ... 
22402234    Traceback (most recent call last): 
22412235    SyntaxError: invalid character '£' (U+00A3) 
22422236
2243-    Invalid pattern matching constructs:
2237+ Invalid pattern matching constructs: 
22442238
22452239    >>> match ...: 
22462240    ...   case 42 as _: 
23022296    Traceback (most recent call last): 
23032297    SyntaxError: positional patterns follow keyword patterns 
23042298
2299+     >>> match ...: 
2300+     ...   case {**double_star, "spam": "eggs"}: 
2301+     ...     ... 
2302+     Traceback (most recent call last): 
2303+     SyntaxError: double star pattern must be the last (right-most) subpattern in the mapping pattern 
2304+ 
2305+     >>> match ...: 
2306+     ...   case {"foo": 1, **double_star, "spam": "eggs"}: 
2307+     ...     ... 
2308+     Traceback (most recent call last): 
2309+     SyntaxError: double star pattern must be the last (right-most) subpattern in the mapping pattern 
2310+ 
23052311Uses of the star operator which should fail: 
23062312
23072313A[:*b] 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments