[Twisted-Python] Re: internet passport.py,1.15,1.16
glyph at twistedmatrix.com
Mon Nov 5 17:29:26 EST 2001
On Monday, November 5, 2001, at 03:09 PM, Kevin Turner wrote:
> On Mon, Nov 05, 2001 at 08:24:53AM -0600, Glyph Lefkowitz wrote:
>> Modified Files:
>> Log Message:
>> * small API change to internet.passport; Perspectives are now only
>> attached to the service when they are added to it.
> Um, okay. But why? Your commit just added an extra line to every place
> in the codebase which created a Perspective, without making that code
> any more expressive. If Perspectives in fact only exist to provide a
> perspective to a specific service, in what situation would you create
> Perspectives without having a Service to pass to the constructor?
In any service where you wish to migrate users across server boundaries
or among different simulations, you'll need some flexibility there.
That's why I added the createPerspective method at the same time; I
think the average case should be to assume that perspective creation is
the responsibility of a particular service.
> Even given the existance of such situations, Service.createPerspective
> is decidedly *not* one of them. Why does a Perspective returned from
> a Service method -- which has been added to the Service's list of
> perspectives -- not have its service attribute set?
You are completely correct. I just checked in a fix.
______ you are in a maze of twisted little applications, all
| |_\ remarkably consistent.
| | -- glyph lefkowitz, glyph @ twisted matrix . com
More information about the Twisted-Python