On Thu, 25 Mar 2021 at 19:51, Paul Royik <distantjob...@gmail.com> wrote:
>
> This is a code for fuzzy_and:
> rv = True
> for ai in args:
>     ai = fuzzy_bool(ai)
>     if ai is False:
>         return False
>     if rv: # this will stop updating if a None is ever trapped
>         rv = ai
> return rv
>
> Is there any reason why None is not immediately returned?

To be clear you are talking about this function:
https://github.com/sympy/sympy/blob/aa22709cb7df2d7503803d4b2c0baa7aa21440b6/sympy/core/logic.py#L115

If you call fuzzy_and([True, None, False]) then it needs to run
through to the final False to be able to return False.


Oscar

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAHVvXxTjVf8ZP_V9VVUiZXF8wyYN8d2PVTLDTsWYdrkRyU-ZxQ%40mail.gmail.com.

Reply via email to