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 rhettinger
Recipients
Date 2005-09-08.06:36:40
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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
History
Date User Action Args
2007-08-23 14:34:13adminlinkissue1281383 messages
2007-08-23 14:34:13admincreate