[Twisted-Python] Transporting pb.Copyable classes?

Andrew Bennetts andrew-twisted at puzzling.org
Tue Apr 20 19:39:48 MDT 2004


On Tue, Apr 20, 2004 at 05:48:00PM -0700, Jasper Phillips wrote:
> 
> On Wed, 21 Apr 2004, Andrew Bennetts wrote:
> > 
> > I'm not a PB expert (or even close), but I always lean towards passing data
> > rather than code (or code-like things like classes) over remote method calls
> > when I can :)
> 
> That's certainly feasible, but then I have an extra unserialize step
> cluttering my code as the classes passed have attributes I want to access.
> In general I'm passing game state which exists naturally as code, and while
> I could always serialize and unserialize it, why bother if I don't have to?

That's odd, I would've expected game state to exist naturally as *data*, not
code. :)

Perhaps you should elaborate more on how you're representing things?

-Andrew.





More information about the Twisted-Python mailing list