This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients lemburg, vstinner
Date 2010-06-24.23:28:47
SpamBayes Score 0.0017048385
Marked as misclassified No
Message-id <1277422131.02.0.354002642954.issue9076@psf.upfronthosting.co.za>
In-reply-to
Content
The following 4 functions are public but not documented and not used in Python3:
 - PyUnicode_AsDecodedObject(), PyUnicode_AsEncodedObject()
 - PyUnicode_AsDecodedUnicode(), PyUnicode_AsEncodedUnicode()

In Python2, PyUnicode_AsDecodedObject() was used by unicode.decode() method, but Python3 has no more str.decode() method (see the recent discussion on python-dev mailing list about .transform() / .untransform()).

In Python2, unicode.encode() uses PyUnicode_AsEncodedObject(), but in Python3 str.encode() uses PyUnicode_AsEncodedString() which ensures that the result type is bytes.

PyUnicode_AsDecodedUnicode() and PyUnicode_AsEncodedUnicode() were added by Marc-Andre Lemburg in r63986. These functions may be used for .transform() / .untranform() proposition, but this proposition is not yet accepted and the functions are now unused.

If you decide to keep one of these functions, the function have to be documented.
History
Date User Action Args
2010-06-24 23:28:51vstinnersetrecipients: + vstinner, lemburg
2010-06-24 23:28:51vstinnersetmessageid: <1277422131.02.0.354002642954.issue9076@psf.upfronthosting.co.za>
2010-06-24 23:28:49vstinnerlinkissue9076 messages
2010-06-24 23:28:49vstinnercreate