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 loewis
Recipients loewis, skip.montanaro
Date 2007-09-04.09:47:48
SpamBayes Score 0.04190135
Marked as misclassified No
Message-id <1188899269.49.0.323989780721.issue1374063@psf.upfronthosting.co.za>
In-reply-to
Content
I have three problems with the current form of the patch:

a) in the documentation, it should state that __dict__ is an attribute,
not a method.
b) why are you moving the subclassed-from-builtin types into the except
block? It is there to reject things that have an __dict__, but are
derived from a builtin class.
c) Notice that your subclass-from-dict example is flawed. It does have
an __dict__ attribute, but that is *not* the contents to be marshalled:

py> class D(dict):pass
...
py> d=D()
py> d[1]=2
py> d.__dict__
{}
py>

Here, we would marshal an empty dict, however, the real dict has
contents to be marshalled.

IMO, it's correct to not be able to marshal dict subclasses. People
created them on purpose, and we cannot guess what that purpose was.
History
Date User Action Args
2007-09-04 09:47:49loewissetspambayes_score: 0.0419014 -> 0.04190135
recipients: + loewis, skip.montanaro
2007-09-04 09:47:49loewissetspambayes_score: 0.0419014 -> 0.0419014
messageid: <1188899269.49.0.323989780721.issue1374063@psf.upfronthosting.co.za>
2007-09-04 09:47:49loewislinkissue1374063 messages
2007-09-04 09:47:48loewiscreate