Message26195
Logged In: YES
user_id=80475
I think you're misunderstanding. Direct pickling of arrays
does raise a TypeError. It would be nice if it also did as
an object attribute; however, I'm not bothered by it enough
to spend development time tracing down the issue and then
altering otherwise correct Py2.4 code just to generate a
prettier message. It is enough for me that the docs do not
promise pickling, that a message is generated by a direct
attempt to pickle, that the OP's buggy code eventually
errors out, and that everything works fine in Py2.5.
I have no objections to someone finding a way to generate a
better error message but think the time would better be
spent elsewhere.
>>> from array import array
>>> from pickle import dumps, loads
>>> ia = array('i', [3,2,1])
>>> ib = loads(dumps(ia))
Traceback (most recent call last):
. . .
TypeError: can't pickle array objects |
|
Date |
User |
Action |
Args |
2007-08-23 14:34:13 | admin | link | issue1281383 messages |
2007-08-23 14:34:13 | admin | create | |
|