Laurence Rowe wrote:
> yuppie wrote:
>> 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).
>> "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
>> with this result
> That thread refers to 'content' rather than 'context'.
The links to the thread were not meant as a contribution to the
discussion if 'context' is better than 'object'. My point is that this
was discussed before and that using 'object' was an explicit decision.
(And 'context' was also considered:
> Page templates have already made 'context' available as an alternative
> to 'here'. I don't see why 'object' should be treated any differently.
> "There should be one-- and preferably only one --obvious way to do it."
The proposal was to *add* an alias. That means two ways to do it. It
makes the chance higher that you guess the right name, but it doesn't
make things more obvious.
And the proposal was to change the expression context for actions. What
about CachingPolicyManager and DCWorkflow?
Zope-CMF maillist - Zope-CMF@lists.zope.org
See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests