[Twisted-Python] Jellying Decimals?

Jasper jasper at peak.org
Tue Oct 9 18:18:26 EDT 2007

Jean-Paul Calderone wrote:
> On Sat, 06 Oct 2007 14:45:42 -0700, Jasper <jasper at peak.org> wrote:
>> I'm trying to Jelly decimal.Decimals, using Twisted 2.4.  I've tried 
>> a few approaches, such as deriving my own Decimal class from 
>> decimal.Decimal, pb.RemoteCopy, and pb.Copyable, but no luck.
>> Is there an easy way to do this, without patching twisted itself?  
>> Worse case I could always fall back on passing strings across the 
>> wire I guess, but that's not very enticing. :-/
> Jelly isn't currently extensible in this way.  There isn't really any
> good reason that it *shouldn't* be.  However, someone will need to do
> the work.
> Jean-Paul

That was my impression from looking through the code as well; jelly 
requires old style python classes, and that's that.

I've hacked in a special case work around for Decimals, but it's just a 
hack and not really suitable for general inclusion.  I'm reluctant to 
put further work into it, as I recall that there is a new version PB in 
the works, which I suspect will completely redo how things are "jellied".


More information about the Twisted-Python mailing list