[Zope-dev] Re: SVN: Zope/branches/ajung-zpt-end-game/...

Florent Guillaume fg at nuxeo.com
Wed May 31 13:41:56 EDT 2006


On 31 May 2006, at 19:20, Tres Seaver wrote:
> I uploaded a similar one, except with deprecation warning, to the
> collector issue I added:
>
>  http://www.zope.org/Collectors/Zope/2118

Ah thanks, I missed it.

> My variation also creates an expression which would raise a  
> KeyError if
> evaluated, rather than returning None.  I don't think anybody can
> actually be depending on what the current code gives back if an empty
> expression is called, so yours should be equally fine.

If you say it used to return the expression context, then I'm pretty  
sure nobody used the result. OTOH I'd rather return None just in  
case, it gives reasonable semantics.

> WRT dprecation:  I would actually prefer no* to have the warning,
> myself;  I don't think that a usage which has been workable for so  
> long
> is actually in error.

I agree, we should just decree "in Zope 2, empty ZPT path expression  
are allowed and evaluate to None".

Florent

> We should probably add a test which verifies compilability of empty
> expressions, plus whichever behavior we specify.

-- 
Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   fg at nuxeo.com




More information about the Zope-Dev mailing list