[Python-ideas] Being able to specify

Ram Rachum cool-rr at cool-rr.com
Tue Dec 15 18:51:32 CET 2009


Vitor Bosshard <algorias at ...> writes:
> > And what happens when State refers to another object which refers to a
> > Persistent?
> 
> Then that object would need to implement the same method, perhaps by
> inheriting form a common base.

And what if the object is from a class defined by a third-party module that I 
can't change?

> The point is that it can be done in a
> straightforward manner without needing to change the stdlib.

I guess so, yes. My method would be something like what Jacob said, abusing
the memo dict to pass the copying mode. But I thought perhaps we can set a 
standard way for specifying different copy modes, because otherwise I'll do my 
memo hack and someone else will do his different memo hack and it won't be 
compatible.

I'll detail my hack later today when I'll be back home.

Ram.




More information about the Python-ideas mailing list