File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1376,11 +1376,10 @@ These can be used as types in annotations. They all support subscription using
13761376      class ctype: 
13771377           kind: str 
13781378
1379-       Annotated[int, ValueRange(3, 10), ctype("char")] 
1379+       a1 = Annotated[int, ValueRange(3, 10), ctype("char")] 
1380+       a2 = Annotated[int, ctype("char"), ValueRange(3, 10)] 
13801381
1381-       assert Annotated[int, ValueRange(3, 10), ctype("char")] != Annotated[ 
1382-           int, ctype("char"), ValueRange(3, 10) 
1383-       ] # Order matters 
1382+       assert a1 != a2 # Order matters 
13841383
13851384   It is up to the tool consuming the annotations to decide whether the
13861385   client is allowed to add multiple metadata elements to one annotation and how to
@@ -1445,6 +1444,9 @@ These can be used as types in annotations. They all support subscription using
14451444        typing.Annotated[int, 'very', 'important', 'metadata'] 
14461445        >>> X.__metadata__ 
14471446        ('very', 'important', 'metadata') 
1447+ 
1448+      .. doctest ::
1449+ 
14481450        >>> Password =  Annotated[str , " secret"  
14491451        >>> Password.__origin__ 
14501452        <class 'str'> 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments