Martin v. Löwis added the comment:

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.

----------
assignee: loewis -> skip.montanaro

_____________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1374063>
_____________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to