Re: Request subclassing

Matt Patterson <[email protected]>
Newsgroups gmane.comp.web.quixote.user
Message-ID <[email protected]>
On 10 Nov 2005, at 11:43, David Binger wrote:

> If people are going to the trouble to subclass HTTPRequest, then I  
> don't think
> subclassing Publisher too will present any significant obstacle.   
> It seems
> better to me to leave the keyword option out.

I think that's probably better.

> If the Publisher is be the authority request instance construction,  
> maybe
> it also be the caller of the request constructor.
>
>     def process(self, stdin, env):
>         request = HTTPRequest(stdin, env)
>         return self.process_request(request)
>
> Wouldn't this simplify the responsibilities of the driver scripts?
> (And you could override process to get your customized requests.)

Yeah, I like that. That seems to be a  nice encapsulation, and it  
should still allow the vast majority of users to upgrade without  
having to do anything (and the WSGI wrapper patch would be trivial).

Matt

-- 
   Matt Patterson | Design & Code
   <[email protected]> | http://www.emdash.co.uk/
   <[email protected]> | http://www.reprocessed.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.