diff options
author | Fred Drake <fdrake@acm.org> | 2000-08-31 15:21:11 +0000 |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-08-31 15:21:11 +0000 |
commit | 079ab02648a2b6754f6f6aacc8fe879852dfba47 (patch) | |
tree | 0213363cc2398044ed05b93d3936aef4eab24a18 /Python/sysmodule.c | |
parent | b2e455ee8672c17af7f032c6cd10b8030f0a5a5b (diff) | |
download | cpython-079ab02648a2b6754f6f6aacc8fe879852dfba47.tar.gz |
_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.
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 51a85e0a5d..d500a36471 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", |