[Zope-CMF] adding 'context' as an alias for 'object' in action expressions

Ross Patterson me at rpatterson.net
Sun Nov 30 14:25:53 EST 2008


yuppie <y.2008 at wcm-solutions.de> writes:

> David Glick wrote:
>> Does anyone have an objection to me adding 'context' as an alias for 
>> 'object' in the expression context that is built when executing CMF 
>> action expressions (in getExprContext in CMFCore/Expression.py)?  This 
>> would remove one common source of minor confusion for beginning 
>> CMF/Plone developers (namely, having to use object in action expressions 
>> when you use context everywhere else).
>
> -1
>
> "There should be one-- and preferably only one --obvious way to do it."
>
> 'context' is deprecated for this kind of expressions, CMF uses 'object' 
> everywhere. Supporting 'object' *and* 'context' or switching from 
> 'object' to 'context' will cause even more confusion.
>
> Please see this thread
> http://mail.zope.org/pipermail/zope-cmf/2005-March/021990.htmlwith this result
> http://mail.zope.org/pipermail/zope-cmf/2005-March/021999.html

+1

I'm not really up on the historical considerations, but I'm definitely
in favor of "context" and definitely opposed to "object".  "object" is
too generic, the request is an object after all, everything is an
object.  "context" reads more like what it is.

Ross



More information about the Zope-CMF mailing list