Discussion:
[Twisted-Python] web Resource question
Kevin Mcintyre
2016-06-16 04:16:08 UTC
Permalink
what is child.server = self.server in Resource.putChild?

shouldn't it be child.server = self?
Cory Benfield
2016-06-16 12:11:23 UTC
Permalink
Post by Kevin Mcintyre
what is child.server = self.server in Resource.putChild?
shouldn't it be child.server = self?
I don’t think so. The reference to the server is presumably intended to refer to the Site object that is hosting the Resource. With that said, I can’t actually *find* anywhere that sets the server on a Resource, so it’s possible that the whole thing is vestigial.

Cory
Kevin Mcintyre
2016-06-16 18:14:37 UTC
Permalink
Hey, thanks for the reply.

It seems like there's the possibility of more beneficial assignments...but
first trying to understand if there's a specific reason for the
child.server assignment.
Post by Cory Benfield
Post by Kevin Mcintyre
what is child.server = self.server in Resource.putChild?
shouldn't it be child.server = self?
I don’t think so. The reference to the server is presumably intended to
refer to the Site object that is hosting the Resource. With that said, I
can’t actually *find* anywhere that sets the server on a Resource, so it’s
possible that the whole thing is vestigial.
Cory
_______________________________________________
Twisted-Python mailing list
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Loading...