mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 10:26:02 +00:00 
			
		
		
		
	Fixed an example in the use of email.Utils.getaddresses(). The
failobj has to be a list or the `+' can fail.
This commit is contained in:
		
							parent
							
								
									d7c3652aa7
								
							
						
					
					
						commit
						d05e051aa7
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		|  | @ -40,10 +40,10 @@ simple example that gets all the recipients of a message: | ||||||
| \begin{verbatim} | \begin{verbatim} | ||||||
| from email.Utils import getaddresses | from email.Utils import getaddresses | ||||||
| 
 | 
 | ||||||
| tos = msg.get_all('to') | tos = msg.get_all('to', []) | ||||||
| ccs = msg.get_all('cc') | ccs = msg.get_all('cc', []) | ||||||
| resent_tos = msg.get_all('resent-to') | resent_tos = msg.get_all('resent-to', []) | ||||||
| resent_ccs = msg.get_all('resent-cc') | resent_ccs = msg.get_all('resent-cc', []) | ||||||
| all_recipients = getaddresses(tos + ccs + resent_tos + resent_ccs) | all_recipients = getaddresses(tos + ccs + resent_tos + resent_ccs) | ||||||
| \end{verbatim} | \end{verbatim} | ||||||
| \end{funcdesc} | \end{funcdesc} | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Barry Warsaw
						Barry Warsaw