HTTP Client, code clarity problem?
[email protected] Thu, 11 Mar 2010 04:02:04 -0000
| Newsgroups | gmane.comp.python.twisted.bugs |
|---|---|
| Message-ID | <[email protected]> |
New submission from zimmer <None>:
In the function handleStatus_302 it looks as though handleStatus_301 will be called twice if self.afterFoundGet is True, while this is not the case it still could cause confusion. Is there a reason that it is only an if and not an if/else? An if/else would ,in my opinion, make the code clearer.
So change this...
{{{
def handleStatus_302(self):
if self.afterFoundGet:
self.handleStatus_303()
self.handleStatus_301()
}}}
to this...
{{{
def handleStatus_302(self):
if self.afterFoundGet:
self.handleStatus_303()
else:
self.handleStatus_301()
}}}
----------
Type : enhancement
Component: web
Keywords :
Priority : normal
Nosy :
----------
http://twistedmatrix.com/trac/ticket/4365