From 592f2d6c857943e0d833d77bba8ed65f0aa4e04c Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Thu, 31 Aug 2000 15:21:11 +0000 Subject: _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. --- Python/sysmodule.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 51a85e0..d500a36 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -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", -- cgit v0.12