On 2006-12-20, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> For array.array "B" means unsigned char, and such arrays accept to be
> initialized from (str) strings too, this is quite useful:
>
>>>> from array import array
>>>> a = array("B", "hello")
>
> But it seems such capability isn't shared with the append:
>
>>>> a.extend("hello")
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> TypeError: an integer is required

Try:

>>> a.fromstring("hello")

-- 
Neil Cerutti
I have opinions of my own -- strong opinions -- but I don't always agree with
them. --George W. Bush
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to