STINNER Victor added the comment: Oops, I forgot to attach decimal-2.patch, here you have.
> I would dissuade from direct using of FASTCALL, but Argument Clinic is enough > reliable. I wrote decimal-2.patch in a few minutes, when I was trying to find all functions still calling _PyStack_AsTuple() in my tp_fast{new,init,call} fork. I just wrote it to identify which parts of CPython can be optimized to make bm_telco faster. I agree that Argument Clinic should be preferred over using directly METH_FASTCALL, especially for the _decimal module: Stefan already wrote that he wants to have the same code base on Python 3.5, 3.6 and 3.7. > I would recommend to use Argument Clinic unless Stefan supports external fork > of the decimal module and is limited by public API. What is the status of Argument Clinic? Is it something "public" or not? The status of _decimal is also unclear to me. Is it part of CPython or not? :-) I know that there is also a "backported" module for Python 2: https://pypi.python.org/pypi/cdecimal http://www.bytereef.org/mpdecimal/index.html IMHO it's a great tool. Maybe it's time to make it usable outside CPython in Python 3.7? Or maybe we should wait until the remaining missing features are implemented? Issues #20291 and #29299 for example. I'm now waiting for Stefan's feedback ;-) ---------- Added file: http://bugs.python.org/file46435/decimal-2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29301> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com