On Wed, Jul 1, 2009 at 2:04 AM, annet <[email protected]> wrote:
> > > Back to the logic: > > not(p or q or r) is equivalent to: not p and not q and not r > (DeMorgans' theorem) > > Duvo said I should use not p *or* not q *or* not r instead of not (p or q > or r) This is incorrect; I think duvo made a type/mistake - see http://en.wikipedia.org/wiki/De_Morgan%27s_laws not ( p or q or r) is equivalent to not p *and* not q *and* not r But you can keep the form you have. Among other things, with Python this uses short circuit evaluation, so it's more efficient. Does this help clarify? - Yarko > but in case not 1 or not 1 or not 1 this would result in 0 or 0 > or 0 which evaluates to 0. So in case p, q and r all contain results > the results would not be displayed ... or am I wrong here? > > I described my considerations in my previous post. If I am wrong, let > me know. > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

