Mercurial > cpython-lru_cache-weakref
diff Python/sysmodule.c @ 14295:e5253b692e9f legacy-trunk
_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.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Thu, 31 Aug 2000 15:21:11 +0000 |
| parents | 128f641191c3 |
| children | b8b3f76ffd51 |
line wrap: on
line diff
--- a/Python/sysmodule.c Thu Aug 31 15:10:24 2000 +0000 +++ b/Python/sysmodule.c Thu Aug 31 15:21:11 2000 +0000 @@ -420,14 +420,11 @@ */ #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",
