Commit 592f2d6c authored by Fred Drake's avatar Fred Drake

_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.
parent 0625777b
...@@ -420,14 +420,11 @@ _PySys_Init(void) ...@@ -420,14 +420,11 @@ _PySys_Init(void)
*/ */
#if PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_ALPHA #if PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_ALPHA
s = "alpha"; s = "alpha";
#endif #elif PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_BETA
#if PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_BETA
s = "beta"; s = "beta";
#endif #elif PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_GAMMA
#if PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_GAMMA
s = "candidate"; s = "candidate";
#endif #elif PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_FINAL
#if PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_FINAL
s = "final"; s = "final";
#endif #endif
PyDict_SetItemString(sysdict, "version_info", PyDict_SetItemString(sysdict, "version_info",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment