[Python-Dev] weird docstring generated by argument clinic

Stefan Behnel stefan_ml at behnel.de
Thu Jan 30 07:25:01 CET 2014


for two days now, the signature embedding tests in Cython have been failing
with this (doctest) error:

    f_D(long double D) -> long double
    f_D(long double D) -> long double


The first line that Cython writes into the docstring is the "expected" one
above. So far, all CPython versions have ignored it, Py3.4 then started
picking it up at some point due to the argument clinic changes, but
properly copied it over to the (IIRC) "__signature__" attribute. However,
the recent change now lead to the above being dumped into the docstring.

Could someone please quickly explain what the purpose of the first line is
and why it says "None" at the end?

Is there anything we should do on our side in order to fix this? Since many
of our users embed their signatures for documentation purposes (it was the
only way to make them visible in previous CPython versions and is supported
by several tools, e.g. epydoc), this is a rather annoying result for them.


More information about the Python-Dev mailing list