Author belopolsky
Recipients belopolsky, eric.smith, ezio.melotti, lemburg, mark.dickinson, skrah, vstinner
Date 2010-12-02.22:08:48
SpamBayes Score 1.63276e-10
Marked as misclassified No
Message-id <AANLkTimx9h8SE2-DPSikyR7AJECuPmyJ1douXeRt0AqP@mail.gmail.com>
In-reply-to <4CF810F1.8060004@egenix.com>
Content
On Thu, Dec 2, 2010 at 4:34 PM, Marc-Andre Lemburg
<report@bugs.python.org> wrote:
..
>  * Please change the API _PyUnicode_NormalizeDecimal() to
>   PyUnicode_ConvertToASCIIDecimal() - that's closer to what
>   it does.
>

Are you sure it is a good idea to give it a public name?  I have no
problem with calling it _PyUnicode_ConvertToASCIIDecimal().
("Transform" may be a better term, though.)

>  * Don't have the API remove any whitespace. It should just
>   work on decimal digit code points (chainging the length
>   of the Unicode string is a bad idea).
>

Yes, that was a bad idea, but the old EncodeDecimal was replacing all
Unicode space with ASCII ' '.  It will be hard to replicate old
behavior without doing the same in  ConvertToASCIIDecimal().

>  * Please remove the note "This function is no longer used.
>   Use _PyUnicode_NormalizeDecimal instead." from the
>   PyUnicode_EncodeDecimal() API description in the
>   header file. The API won't go away (it does have its
>   use and is being used in 3rd party extensions) and
>   you cannot guide people to use a Python private API.
>

OK.  I had the same reservations about recommending private API.

>  * Please double check the ref counts. I think you have a leak
>   in PyLong_FromUnicode() (for norm) and possible in other
>   functions as well.

Will do.  I should also add some more tests for error conditions.  I
test for leaks, but if the error branch is not covered, it is not
covered.
History
Date User Action Args
2010-12-02 22:08:51belopolskysetrecipients: + belopolsky, lemburg, mark.dickinson, vstinner, eric.smith, ezio.melotti, skrah
2010-12-02 22:08:48belopolskylinkissue10557 messages
2010-12-02 22:08:48belopolskycreate