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 socketpair
Recipients Arfrever, loewis, ncoghlan, ronaldoussoren, skrah, socketpair, steve.dower, teoliphant, wiggin15
Date 2016-05-25.12:04:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1464177848.51.0.703685694169.issue15625@psf.upfronthosting.co.za>
In-reply-to
Content
Trigger the same bug....

I want to effectively slice big unicode string. So I decide to use memoryview for that in order to eliminate memory copying.

In [33]: a = array.array('u', 'превед')
In [34]: m = memoryview(a)
In [35]: m[2:]
Out[35]: <memory at 0x7efc98fcc048>
In [36]: m[0]
...
NotImplementedError: memoryview: format w not supported


1. Why format 'w' error if I asked 'u' ?
2. Format 'w' is not listed in https://docs.python.org/3.5/library/array.html
3. What is alternative for fast slicing, like memoryview(bytearray(b'test')), but for unicode ?
History
Date User Action Args
2016-05-25 12:04:08socketpairsetrecipients: + socketpair, loewis, teoliphant, ronaldoussoren, ncoghlan, Arfrever, skrah, wiggin15, steve.dower
2016-05-25 12:04:08socketpairsetmessageid: <1464177848.51.0.703685694169.issue15625@psf.upfronthosting.co.za>
2016-05-25 12:04:08socketpairlinkissue15625 messages
2016-05-25 12:04:08socketpaircreate