Message168379
Py_UNICODE is an typedef for wchar_t and that type is 4 bytes long:
>>> a.tobytes()
b'h\x00\x00\x00e\x00\x00\x00l\x00\x00\x00l\x00\x00\x00o\x00\x00\x00 \x00\x00\x00w\x00\x00\x00o\x00\x00\x00r\x00\x00\x00l\x00\x00\x00d\x00\x00\x00'
>>> a = array.array('u', 'bar')
>>> a.tobytes()
b'b\x00\x00\x00a\x00\x00\x00r\x00\x00\x00'
>>> len(a.tobytes())
12
>>>
This is with a checkout that was created yesterday.
The issue is not resolved, there now is no way to easily create a UCS2 buffer; while there was in earlier releases of Python (with the default narrow build) |
|
Date |
User |
Action |
Args |
2012-08-16 12:09:01 | ronaldoussoren | set | recipients:
+ ronaldoussoren, loewis, ncoghlan, skrah |
2012-08-16 12:09:01 | ronaldoussoren | set | messageid: <1345118941.58.0.634028657272.issue15035@psf.upfronthosting.co.za> |
2012-08-16 12:09:00 | ronaldoussoren | link | issue15035 messages |
2012-08-16 12:09:00 | ronaldoussoren | create | |
|