[Zope-Coders] Zope test results

Guido van Rossum guido@python.org
Wed, 12 Jun 2002 10:12:09 -0400


> I'd talk to you directly but I may as well let others know who are 
> interested. ;-)  There are certain times when you'd like to create an 
> object and, within the same transaction, make a copy of it. 
> Unfortunately, it doesn't work if _p_jar isn't set.  So I added that 
> little hack many moons ago.
> 
> But I think I know the right solution now: commit a subtransaction just 
> before copying.  The _p_jar (and _p_oid) of all new objects will be set. 
>   It should be perfectly safe since copying involves a subtransaction 
> anyway, so now we'll just be using two subtransactions instead of one. 
> I'll work on it.

I may be missing something fundamental here, but why is committing a
subtransaction in order to be able to copy not a hack?

--Guido van Rossum (home page: http://www.python.org/~guido/)