[twill] wsgi_intercept, https and twill

John J Lee jjl at pobox.com
Wed Jan 9 12:07:33 PST 2008


On Wed, 9 Jan 2008, Titus Brown wrote:
> On Mon, Jan 07, 2008 at 08:17:45PM +0000, John J Lee wrote:
[...]
> -> You're mutating a class attribute here -- not a good idea.
>
> Understood.
>
> It's a private copy of mechanize.Browser at this point, though, so it's
> unlikely to matter.

I think mutating class attributes is always a maintainability concern.


> I suppose I could copy this:
>
> class Browser(UserAgentBase):
>   handler_classes = copy.copy(UserAgentBase.handler_classes)
>
> Is that the right way to go about it?

Yes.  I wasn't trying to bring any mechanize-specific concern to your 
attention, I was just pointing out that mutating class attributes is a Bad 
Idea.


John




More information about the twill mailing list