summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-08-31 15:21:11 (GMT)
committerFred Drake <fdrake@acm.org>2000-08-31 15:21:11 (GMT)
commit592f2d6c857943e0d833d77bba8ed65f0aa4e04c (patch)
treeacb3a2d756cac18e9547fbe6a6a38005f951357c
parent0625777b53838d16fe11f57f5f79767dc539b738 (diff)
downloadcpython-592f2d6c857943e0d833d77bba8ed65f0aa4e04c.zip
cpython-592f2d6c857943e0d833d77bba8ed65f0aa4e04c.tar.gz
cpython-592f2d6c857943e0d833d77bba8ed65f0aa4e04c.tar.bz2
_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.
-rw-r--r--Python/sysmodule.c9
1 files 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",