[Twisted-Python] SMTP patch

Peter Hansen peter at engcorp.com
Fri May 23 06:57:56 MDT 2003


Andrew Bennetts wrote:
> 
> Oops!  As you imply, that should've been "200 <= code < 300".  I still don't
> like the idea of constructing 100 integers, even lazily, just to test
> bounds, though.
> 
> Of course, if the status code was left as a string, then you could simply do
> "if code.startswith('2'):"  :)

if str(code).startswith('2'):  ??

-Peter




More information about the Twisted-Python mailing list