[Python-ideas] Break the dominance of boolean values in boolean context

Chris Rebert pyideas at rebertia.com
Thu Sep 15 07:30:58 CEST 2011


On Wed, Sep 14, 2011 at 9:22 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
<snip>
> NumPy is not the only use case by a long shot. The main reason
> I want it is for expressing database queries. You only have to
> look at the contortions that things like Django have to go
> through to wonder whether there's a better way.

So, you want this in order to avoid (e.g.) `X & Y` and `not_(Z)`, in
favor of `X and Y` and `not Z`? Doesn't seem like that big of a win in
the `and` and `or` cases.

Cheers,
Chris



More information about the Python-ideas mailing list