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 sschwarzer
Recipients docs@python, sschwarzer
Date 2014-04-23.05:57:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1398232634.34.0.847410110548.issue21333@psf.upfronthosting.co.za>
In-reply-to
Content
I recently was confused whether to raise a `PicklingError` or `TypeError` in `__getstate__` if objects of my class can't and shouldn't be pickled. [1]

Terry Reedy advised I should use `TypeError`. [2]

I wonder if the `pickle` module documention should explicitly recommend using `TypeError` if a class wants to say that its objects can't be pickled. What do you think?

[1] https://mail.python.org/pipermail/python-list/2014-April/670987.html
[2] https://mail.python.org/pipermail/python-list/2014-April/671002.html
History
Date User Action Args
2014-04-23 05:57:14sschwarzersetrecipients: + sschwarzer, docs@python
2014-04-23 05:57:14sschwarzersetmessageid: <1398232634.34.0.847410110548.issue21333@psf.upfronthosting.co.za>
2014-04-23 05:57:14sschwarzerlinkissue21333 messages
2014-04-23 05:57:13sschwarzercreate