[Python-Dev] cpython: Document PyUnicode_Copy() and PyUnicode_EncodeCodePage() (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Fri Dec 9 10:12:50 CET 2011
- Previous message: [Python-Dev] cpython: Document PyUnicode_Copy() and PyUnicode_EncodeCodePage()
- Next message: [Python-Dev] cpython: Document PyUnicode_Copy() and PyUnicode_EncodeCodePage()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Dec 9, 2011 at 6:44 PM, "Martin v. Löwis" <martin at v.loewis.de> wrote:
Am 09.12.2011 01:35, schrieb Antoine Pitrou:
On Fri, 09 Dec 2011 00:16:02 +0100 victor.stinner <python-checkins at python.org> wrote:
+.. c:function:: PyObject* PyUnicodeCopy(PyObject *unicode) + + Get a new copy of a Unicode object. + + .. versionadded:: 3.3 I'm not sure I understand. Why would you make a copy of an immutable object? It can convert a unicode subtype object into a an exact unicode object. I'd rename it to PyUnicodeAsExactUnicode, and undocument it.
Isn't it basically just exposing a C level version of the unicode() builtin's behaviour? While I agree the name could be better (and PyUnicode_AsExactUnicode would certainly work), why make it private?
Cheers, Nick.
-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
- Previous message: [Python-Dev] cpython: Document PyUnicode_Copy() and PyUnicode_EncodeCodePage()
- Next message: [Python-Dev] cpython: Document PyUnicode_Copy() and PyUnicode_EncodeCodePage()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]