[Python-ideas] What is happening with array.array('u') in Python 4?
Chris Barker
chris.barker at noaa.gov
Fri May 8 22:46:20 CEST 2015
On Fri, May 8, 2015 at 5:50 AM, Stefan Behnel <stefan_ml at behnel.de> wrote:
> ISTM that your best bet is currently to look for a suitable module on PyPI
> that implements mutable character arrays. I'm sure you're not the only one
> who needs something like that. The usual suspect would be NumPy, but there
> may be smaller and simpler tools available.
Numpy does have mutable character arrays -- and the Unicode version uses
4bytes per char, regardless of platform (and so should array.array!)
But I don't think you get much of any of the features of strings, and I
doubt that the re module would work with it.
A "real" mutable string type might be pretty nice to have , but I think it
would be pretty hard to d to get it to do everything a string can do. (or
maybe not -- I suppose you could cut and paste the regular string cdce, and
simply add the mutable part....)
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150508/6ff551fd/attachment.html>
More information about the Python-ideas
mailing list