mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	_PySys_Init(): When setting up sys.version_info, use #if/#elif.../#endif
instead of four #if/#endif blocks.  This shortens the
                code and improves readability.
			
			
This commit is contained in:
		
							parent
							
								
									0625777b53
								
							
						
					
					
						commit
						592f2d6c85
					
				
					 1 changed files with 3 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -420,14 +420,11 @@ _PySys_Init(void)
 | 
			
		|||
	 */
 | 
			
		||||
#if PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_ALPHA
 | 
			
		||||
	s = "alpha";
 | 
			
		||||
#endif
 | 
			
		||||
#if PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_BETA
 | 
			
		||||
#elif PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_BETA
 | 
			
		||||
	s = "beta";
 | 
			
		||||
#endif
 | 
			
		||||
#if PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_GAMMA
 | 
			
		||||
#elif PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_GAMMA
 | 
			
		||||
	s = "candidate";
 | 
			
		||||
#endif
 | 
			
		||||
#if PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_FINAL
 | 
			
		||||
#elif PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_FINAL
 | 
			
		||||
	s = "final";
 | 
			
		||||
#endif
 | 
			
		||||
	PyDict_SetItemString(sysdict, "version_info",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue