[Twisted-Python] IFoo(x, persist=1)
Christopher Armstrong
radix at twistedmatrix.com
Thu Apr 22 17:35:08 MDT 2004
Itamar Shtull-Trauring wrote:
> I know this is used a lot (the weakref persistence stuff). Should it be
> option of adaptation or perhaps of adapter registration? Trying to see
> how to fit this in to zope3's, which doesn't do this, and it'd be nice
> to have it as part of their core code rather than ours.
It seems a lot saner to make it a part of registration than adaptation.
The 'persist' argument to __call__ never made sense to me. Think about a
what the objects involved "know": if an object knows that it wants an
adapter and it wants it to persist, it can just keep a reference to the
adapter it gets back.
OTOH, we don't currently support marking an adapter persistent at
registration time, do we? I say don't add features that don't have clear
use cases yet.
--
Twisted | Christopher Armstrong: International Man of Twistery
Radix | Release Manager, Twisted Project
---------+ http://radix.twistedmatrix.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: </pipermail/twisted-python/attachments/20040422/cc416654/attachment.sig>
More information about the Twisted-Python
mailing list