[Zope] Re: request.locale - do we have this in 2.9.4?

Dieter Maurer dieter at handshake.de
Tue Sep 5 15:20:42 EDT 2006


Philipp von Weitershausen wrote at 2006-9-5 20:57 +0200:
> ...
>Note that I'm well aware of this issue and have thought hard about it. I 
>think the only long term solution out of this mess is to get rid of the 
>__getattr__ spelling once and for all.

The "__getattr__" may be a stumbling block in principle.

Practically, it will very rarely hinder you to add attributes (such as
"locale") to the request.

True: you can use "REQUEST.locale" or "REQUEST.debug" and expect
to access in fact "REQUEST['locale'] and "REQUEST['debug']" respectively.

But, it is rare that the attribute access syntax is used and if it indeed
results in the wrong result (because the request grew additional attributes),
then it is easy to fix.

Adding the configuration option would (perhaps) make the administrator
aware of the potential cause when he gets informed about wrong values
read from the request.



-- 
Dieter


More information about the Zope mailing list