[ZPT] Memory Leak still?

Ron Bickers rbickers-dated-1008617670.35dd00@logicetc.com
Mon, 10 Dec 2001 14:34:30 -0500


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

> This does point up the case where you want something that acts
> like '|' but
> catches false values as well, so you can write an expression like
> "request/foo ??? foodefault", and have whatever operator would go
> in place
> of '???' evaluate the expression to foodefault if 'request/foo' doesn't
> exist or is false.

This is exactly what I need.

Here's an example.  If the template/myprop doesn't exist or is empty, I want
to use an acquired myprop.

1) template/myprop | here/myprop

   This will never use here/myprop if template has a myprop property, even
if it's blank.

2) python:path('template/myprop | here/myprop')

   This is no better than the first one, correct?  A blank template/myprop
will still be used.

3) python:path('template/myprop') or path('here/myprop')

   This is what I had been doing, since using python evaluates the existence
*and* trueness of template/myprop, so a missing or empty string
template/myprop would result in here/myprop being used.  With the recent
fixes, this is no longer works when template/myprop doesn't exist.

4) python:path('template/myprop | nothing') or path('here/myprop')

   Would this do the trick?
_______________________

Ron Bickers
Logic Etc, Inc.