[issue7652] Merge C version of decimal into py3k.

Jim Jewett report at bugs.python.org
Tue Mar 6 19:23:12 CET 2012


Jim Jewett <jimjjewett at gmail.com> added the comment:

(1)  I think this module would benefit greatly from a map explaining what each file does, and perhaps from some reorganization. 

As best I can yet tell, there are about ~130 files, over a dozen directories, but the only ones that directly affect the implementation are a subset (~33) of the *.c and *h files in Modules/_decimal/ (and not subdirectories).  

Even files that do affect the implementation, such as mpdecimal.c, also seem to have functions thrown in just for testing small pieces of functionality, such as Newton Division.

There may also be some code that really isn't needed, except possibly for backwards compatibility, and could be #ifdef'ed or at least commented.  For example, the comments above io.c function _mpd_strneq(const char *s, const char *l, const char *u, size_t n) mention working around the Turkish un/dotted-i problem when lowercasing -- but why is a decimal library even worried about casing?

(2)  Is assembly allowed?  If not, please make it clear that vcdiv64.asm is just an optional speedup, and that the code doesn't rely upon it.

(3)  Are there parts of this library that provide functionality NOT in the current decimal library?  If so, this should be at least documented, and perhaps either removed or exposed.

----------
nosy: +Jim.Jewett

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7652>
_______________________________________


More information about the Python-bugs-list mailing list