On Fri, Jun 06, 2014 at 06:53:30PM -0700, Neil Girdhar wrote:I'm afraid you're going to need to explain in more detail what you're
> When implementing getstate in coöoerative inheritance, the typical thing to
> do is to call super to get dictionary and add the appropriate entries.
> Setstate is similar: you extract what you need out of the dictionary and
> call super with the remaining entries. Unfortunately, object does not have
> a default implementation, so you need a base class like so:
talking about. Even a link to a discussion elsewhere. I've used
cooperative inheritance without needing to write a getstate or setstate
method, so I have no idea why you think these are important enough to go
into the base object. I presume you're not talking about serialization
formats? That's where I would normally expect to find a getstate and
setstate.
It might also help if you can do a survey of other languages, like Java
and Ruby, and tell us if they have such methods in the base object.
--
Steven
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
--
---
You received this message because you are subscribed to a topic in the Google Groups "python-ideas" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python-ideas/QkvOwa1-pHQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python-ideas+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.