[ZPT] Memory Leak still?

Ron Bickers rbickers-dated-1008613740.442e9a@logicetc.com
Mon, 10 Dec 2001 13:28:59 -0500


> -----Original Message-----
> From: Evan Simpson [mailto:evan@zope.com]

> Ah, yes.  The semantics of this kind of expression have changed, and
> probably should have changed back when '|' was introduced.  Path
> expressions
>   had returned an un-raised exception object if the path was
> undefined, and
> you could treat this as a false value for purposes of Python
> 'or'.  The fix
> for the memory leak changes this so that path expressions always directly
> raise the Undefined exception, so your expression needs to be changed to:
>
> "item/url | nothing" or "python:path('item/url | nothing')" (inefficient,
> but shows how you could do further logical ops.

I'm not sure I follow 100%, but the reason I used python:path('item/url') or
nothing instead of just item/url | nothing was so that the existence *and*
value of item/url would determine whether the 'or' would be used.  With just
item/url | nothing, if item/url existed (whether true or false), 'nothing'
would never be used.  So how would I do this now?
_______________________

Ron Bickers
Logic Etc, Inc.