Martijn Pieters wrote:
But because _v_* variables don't get pickled, another thread will never
see them. If you want non-persisting (volatile) variables shared between
threads, you'll have to devise your own mechanism for assuring the
thread-safety of those variables.
Or, instead of
Martijn Pieters wrote:
Erm. The ExtensionClass.stx documentation hints at a ComputedAttribute
class (but as an example of how you could use an ExtensionClass). The
current C implementation of ComputedAttribute is not, as far as I can see,
documented.
Now I think I know the answer to this
On Wed, Jan 10, 2001 at 04:13:49PM +, Chris Withers wrote:
Martijn Pieters wrote:
Erm. The ExtensionClass.stx documentation hints at a ComputedAttribute
class (but as an example of how you could use an ExtensionClass). The
current C implementation of ComputedAttribute is not, as far
Martijn Pieters wrote:
...with this class, your_attribute isn't going to play in Persistence,
is it? (so I can update it lots without worrying about ZODB size
growing... :-)
Yup, this allows you to alias your_attribute to _v_your_attribute without
creating an attribute that *will*
On Wed, Jan 10, 2001 at 05:07:07PM +, Chris Withers wrote:
If you want _set_your_attribute to be called, you
need to override __setattr__:
def __setattr__(self, name, value):
setter = getattr(self, '_set_' + name, None)
if setter:
setter(value)
Chris Withers writes:
Martijn Pieters wrote:
Now I think I know the answer to this one, but I'll ask just to be sure:
class MyClass(Persistent Acquisition.Explicit):
def _set_your_attribute (self,value):
self._v_your_attribute = value
def _get_your_attribute
Chris Withers writes:
with this class, your_attribute isn't going to play in Persistence,
is it? (so I can update it lots without worrying about ZODB size
growing... :-)
But, as I understand it, it is only updated in the thread
that did the update. Your next request may get a
On Wed, Jan 10, 2001 at 11:09:43PM +0100, Dieter Maurer wrote:
Chris Withers writes:
Now I think I know the answer to this one, but I'll ask just to be sure:
class MyClass(Persistent Acquisition.Explicit):
def _set_your_attribute (self,value):
self._v_your_attribute =
On Wed, Jan 10, 2001 at 11:37:55PM -, Chris Withers wrote:
Chris Withers writes:
with this class, your_attribute isn't going to play in Persistence,
is it? (so I can update it lots without worrying about ZODB size
growing... :-)
But, as I understand it, it is only