On Sat, Aug 18, 2007 at 11:30:11AM -0300, Humberto Diogenes wrote:
> I use it.
Sooner or later I will abandon it. I have asked the question to
determine how soon to abandon it. But certainly I am not going to maintain
it forever.
> Just discovered that 0.8 doesn't work very well with ZPT (Zope
> Page Templates). Everytime there's a tal:repeat="x expr" ZPT calls
> "if not expr", which in turn calls __nonzero__ and since 0.8 that
> raises an exception.
It was added to SQLObject to prevent people writing
if MyTable.select():
and force them to use either
if list(MyTable.select()):
or
if MyTable.select().count():
That shows ZPT has a misdesign here. What should SQLObject return in
__nonzero__() in this case? SQLObject doesn't know in advance if there is
a row in the result set.
Please write to a ZPT mailing list pointing them to an example of an
iterable object that cannot be typecasted to boolean.
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss