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 josh.r
Recipients ezio.melotti, josh.r, serhiy.storchaka, vstinner
Date 2014-04-01.21:20:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1396387224.66.0.703493950061.issue21118@psf.upfronthosting.co.za>
In-reply-to
Content
@haypo: Are you planning to run with this then? Or shall I pick up where your patch leaves off?

Thanks for the pointer to the codecs charmap_build; it's not documented anywhere that I can tell, so I didn't even know it existed. Now to dig into the source to figure out what it does and how to use it (both in C and Python).

I know about the fundamental design differences that makes bytes.translate kick str.translate's butt; my plan to make a special purpose mapping-like object that didn't require C layer code to wrap up Py_UCS4 in PyLong, or pull Py_UCS4 out of PyUnicode/PyLong objects was largely to try and get a bytes.translate like implementation, but if 
codecs.charmap_build()/PyUnicode_BuildEncodingMap() can get me 90% of the way there without reinventing the wheel, it's clearly worth looking at.

Again, let me know if it's okay if I try to finish off the work you began, or if you'd prefer to do it yourself.
History
Date User Action Args
2014-04-01 21:20:24josh.rsetrecipients: + josh.r, vstinner, ezio.melotti, serhiy.storchaka
2014-04-01 21:20:24josh.rsetmessageid: <1396387224.66.0.703493950061.issue21118@psf.upfronthosting.co.za>
2014-04-01 21:20:24josh.rlinkissue21118 messages
2014-04-01 21:20:24josh.rcreate