thanks. I forgot DIV had a len method.

Massimo

On May 31, 10:27 pm, DenesL <[email protected]> wrote:
> Reposting 
> fromhttp://groups.google.com/group/web2py/browse_thread/thread/2114e5ab59...
>
> From the python 2.5 manual, library reference, 3.1:
>
> "The following values are considered false:
> ...
> instances of user-defined classes, if the class defines a __nonzero__
> () or __len__() method, when that method returns the integer zero or
> bool value False."
>
> Both INPUT and A derive from DIV which has a __len__ method defined as
> len(self.components).
> INPUT's len is zero while A's is one, so combining that with the 'or'
> in sqlhtml rev979 line 319 gives the above mentioned results.
>
> Denes
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to