Hello,

This is my first post on python mailing list. I've working in code
which must run on python 2 and python 3. I am using array.array as
data buffers. I am stuck with the following code line, which works on
Python 2, but not on Python 3.1.2:

>>> import array
>>> array.array('B', 'test')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: an integer is required

According to Python 3 documentation (as far as I understood it), it
should work. Again, no problem on Python 2. I've googled for people
with similar problems, but got nothing. Does anyone have an idea what
could I be doing wrong?

Thanks in advance.

-- 
Best Regards,
Wander Lairson Costa
LCoN - Laboratório de Computação Natural - Natural Computing Laboratory
(http://www.mackenzie.com.br/lcon.html)
Programa de Pós-Graduação em Engenharia Elétrica (PPGEE)
Faculdade de Computação e Informática (FCI)
Universidade Presbiteriana Mackenzie - SP - Brazil
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to