[issue22194] access to cdecimal / libmpdec API

Antoine Pitrou report at bugs.python.org
Wed Aug 20 22:31:27 CEST 2014


Antoine Pitrou added the comment:

>  3) It's not clear whether users would not be served better by
>     using functions from libmpdec directly (much faster,
>     probably less error handling).

That's what I meant. The issue here is that Python's libmpdec is not exposed to third-party code at all. Also there should probably be a (thin?) API to get at the underlying mpdec object from a cdecimal PyObject (apologies for the poor wording, I'm actually not acquainted with the libmpdec APIs).

As for the Capsule method, well, at least it would be better than nothing (or than any platform-specific hack).

>  2) I would not like to spend time on it if we go ahead and
>     make decimal a builtin (double effort).

I haven't heard any consensus on that yet :-)

(for the record, the context is that we would like to support decimal objects efficiently in Numba)

----------

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


More information about the Python-bugs-list mailing list