File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -638,8 +638,9 @@ task isn't already covered by the URL parsing functions above.
638638
639639   The optional *encoding * and *errors * parameters specify how to deal with
640640   non-ASCII characters, as accepted by the :meth: `str.encode ` method.
641-    *encoding * defaults to ``'utf-8' ``.
642-    *errors * defaults to ``'strict' ``, meaning unsupported characters raise a
641+    Although these parameters default to ``None `` in the function signature,
642+    when processing :class: `str ` inputs, *encoding * effectively defaults to ``'utf-8' ``
643+    and *errors * to ``'strict' ``, meaning unsupported characters raise a
643644   :class: `UnicodeEncodeError `.
644645   *encoding * and *errors * must not be supplied if *string * is a
645646   :class: `bytes `, or a :class: `TypeError ` is raised.
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments