mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Add missing types to docstring of ast.literal_eval.
The reST doc was updated but not the docstring.
This commit is contained in:
		
							parent
							
								
									e7d36fe0a6
								
							
						
					
					
						commit
						2a83cc61d6
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -40,8 +40,8 @@ def literal_eval(node_or_string): | ||||||
|     """ |     """ | ||||||
|     Safely evaluate an expression node or a string containing a Python |     Safely evaluate an expression node or a string containing a Python | ||||||
|     expression.  The string or node provided may only consist of the following |     expression.  The string or node provided may only consist of the following | ||||||
|     Python literal structures: strings, numbers, tuples, lists, dicts, booleans, |     Python literal structures: strings, bytes, numbers, tuples, lists, dicts, | ||||||
|     and None. |     sets, booleans, and None. | ||||||
|     """ |     """ | ||||||
|     _safe_names = {'None': None, 'True': True, 'False': False} |     _safe_names = {'None': None, 'True': True, 'False': False} | ||||||
|     if isinstance(node_or_string, str): |     if isinstance(node_or_string, str): | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Éric Araujo
						Éric Araujo