[Python-ideas] Being able to specify
Terry Reedy
tjreedy at udel.edu
Tue Dec 15 21:59:25 CET 2009
On 12/15/2009 12:51 PM, Ram Rachum wrote:
> 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.
Perhaps you can post a recipe at the Python Cookbook. People who care
about compatibility can follow the same recipe.
More information about the Python-ideas
mailing list