[twill] Bug in FakeResponse

John J Lee jjl at pobox.com
Sat Jun 30 15:38:51 PDT 2007

On Sat, 30 Jun 2007, Jacob Hallén wrote:

> Ahh, I see. The response object as defined in mechanize rewinds the cursor in
> the file as a side effect of going through a copy. Personally I think that is
> not the best of designs. A copy of an object should really be a verbatim copy
> and not something that is just similar to the original.

It's a fair cop.  Also, the .seek() method should not be there, and the 
behaviour currently available via copy.copy() should be exposed as a 
method (called something other than "copy").

> In any case, the FakeResponse needs replacing.

Titus: does mechanize.make_response() do what you need?  Looking at the 
twill code, I think it does.


More information about the twill mailing list