mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	bpo-40721: add note about enum member name case (GH-22231)
* UPPER_CASE preferred as enum members are constants
This commit is contained in:
		
							parent
							
								
									7c11a9acca
								
							
						
					
					
						commit
						542e1df2b0
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -19,6 +19,12 @@ An enumeration is a set of symbolic names (members) bound to unique,
 | 
				
			||||||
constant values.  Within an enumeration, the members can be compared
 | 
					constant values.  Within an enumeration, the members can be compared
 | 
				
			||||||
by identity, and the enumeration itself can be iterated over.
 | 
					by identity, and the enumeration itself can be iterated over.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.. note:: Case of Enum Members
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Because Enums are used to represent constants we recommend using
 | 
				
			||||||
 | 
					    UPPER_CASE names for enum members, and will be using that style
 | 
				
			||||||
 | 
					    in our examples.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Module Contents
 | 
					Module Contents
 | 
				
			||||||
---------------
 | 
					---------------
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue