It's great that you made this change! I hadn't got through my mail, but was going to recommend it... :-) One comment: On Thu, 13 Apr 2000, Fred Drake wrote: >... > --- 409,433 ---- > v = PyInt_FromLong(PY_VERSION_HEX)); > Py_XDECREF(v); > + /* > + * These release level checks are mutually exclusive and cover > + * the field, so don't get too fancy with the pre-processor! > + */ > + #if PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_ALPHA > + v = PyString_FromString("alpha"); > + #endif > + #if PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_BETA > + v = PyString_FromString("beta"); > + #endif > + #if PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_GAMMA > + v = PyString_FromString("candidate"); > + #endif > #if PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_FINAL > ! v = PyString_FromString("final"); > ! #endif > PyDict_SetItemString(sysdict, "version_info", > ! v = Py_BuildValue("iiiNi", PY_MAJOR_VERSION, > PY_MINOR_VERSION, > ! PY_MICRO_VERSION, v, > ! PY_RELEASE_SERIAL)); > Py_XDECREF(v); > PyDict_SetItemString(sysdict, "copyright", I would recommend using the "s" format code in Py_BuildValue. It simplifies the code, and it is quite a bit easier for a human to process. When I first saw the code, I thought "the level string leaks!" Then I saw the "N" code, went and looked it up, and realized what is going on. So... to avoid that, the "s" code would be great. Cheers, -g -- Greg Stein, http://www.lyra.org/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4