[ZODB-Dev] Same transaction object (re)-used for subsequent requests?

Andreas Jung lists at zopyx.com
Tue May 1 05:23:18 EDT 2007



--On 1. Mai 2007 05:15:37 -0400 Tim Peters <tim.peters at gmail.com> wrote:

>
> Here's a very simple example using builtins to illustrate this:
>
>>>> x = {1: 2}
>>>> id(x)
> 10603952
>>>> del x
>>>> x = {3: 4}
>>>> id(x)
> 10603952
>
> Those are obviously entirely different dictionaries, but they live at
> the same memory address (and likely so, by design, and thanks to the
> quick memory reuse allowed by refcounting).
>
> In any case, yes, the intent is that a new transaction object is used
> for each transaction; but, no, seeing the same memory address does not
> mean that isn't happening.

I think you are right (as always). Then let me rephrase the question: how 
can one distinguish if two transaction objects represent the same or
different transactions in such case where memory address is identical?

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zodb-dev/attachments/20070501/daf0c6b7/attachment.bin


More information about the ZODB-Dev mailing list