[ZODB-Dev] List of modified objects

Tim Peters tim at zope.com
Tue Dec 7 16:10:29 EST 2004


[Tim Peters]
>> ...
>> 3. Efficiently determine whether anything is available:
>>
>>       something_exists = False
>>       for thing in it:
>>           something_exists = True
>>           break

[Dieter Maurer]
> This looks like a very convoluted way...
>
>    Four lines of code instead of a simple function call --
>    and probably with a side effect.

But I showed code that would actually work, while you wish away all
difficulties just by *naming* something "a simple function call" <wink>.

I'll record this as saying you're in favor of a new API call that ... does
what?  It's a method on transaction objects?  Returns true if and only if
some object has been modified by the transaction?  If so, should it return
true if the only modified objects at the time were committed in a (one or
more) subtxn?  Do you also/instead want a new API call on resource managers
(Connections) that returns true if and only if some object obtained from the
resource manager has been modified?

It would be helpful if people who want new stuff worked on fishbowl
proposals for them:  flesh them out, finalize details, have a coherent
proposal in an accessible place.  Jim does that for new stuff he wants, and
that's one reason he sometimes gets what he wants.  Of course another reason
may be that he's my boss <wink>.  Whatever, trying to hash out new features
on this mailing list may or may not have been effective in the past, but has
not been in my time.



More information about the ZODB-Dev mailing list