[ZODB-Dev] Unexpected behavior of a volatile property

Patrick K. O'Brien pobrien@orbtech.com
Thu, 11 Oct 2001 17:29:39 -0500


Your explanation did help a lot. Thanks also for the sys.maxint suggestion.
(Don't know why I didn't think of that.) My code probably wasn't very
grokable because it's actually in a bunch of different modules and I was
trying to simplify what I showed. No big deal. I'll let everyone know when
the code is worth downloading. The main point is that I realized that
volatile properties weren't really going to work the way I originally
thought.

I'm not even sure what I really meant by "session". I was just trying to get
the proper mental model for what was going on and I made up words to
substitute for the things I didn't understand. I think I'm getting closer to
that understanding. As I do, I'm realizing that when Zope folks talk about
Zen they are referring more to the torturous process and discipline involved
than they are to the transcendent enlightenment that follows. ;-)

---
Patrick K. O'Brien
Orbtech (http://www.orbtech.com)
"I am, therefore I think."

-----Original Message-----
From: zodb-dev-admin@zope.org [mailto:zodb-dev-admin@zope.org]On Behalf Of
Michel Pelletier
Sent: Thursday, October 11, 2001 1:28 PM
To: pobrien@orbtech.com; ZODB
Subject: Re: [ZODB-Dev] Unexpected behavior of a volatile property

<snip>
  They're probably not as useful as you think they are.

<snip>

> def new():
>     """Return a random integer for use as a key value.
>     The return value can range from -2147483647 to 2147483647."""
>     global choice, randint
>     maxint = 2147483647

BTW, you might want to look into the sys.maxint value on your platform, it
might make this code more flexible.

> Can anyone explain what is going on? I didn't expect a _v_ property to be
> volatile within a session, I just expected it to not be made persistent
and
> to not trigger conflicts. Am I mistaken?

Once again I'm not sure what you think a session is, and I didn't really
grok your code.  Does my explanation above help?

-Michel

_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://lists.zope.org/mailman/listinfo/zodb-dev