[Python-ideas] Break the dominance of boolean values in boolean context
pyideas at rebertia.com
Thu Sep 15 08:06:22 CEST 2011
On Wed, Sep 14, 2011 at 11:00 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> On Thu, Sep 15, 2011 at 3:30 PM, Chris Rebert <pyideas at rebertia.com> wrote:
>> 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.
> It's actually:
> 'x and y' vs 'x & y'
> 'x or y' vs 'x ^ y'
Er, you mean 'x | y', right?
> 'not x' vs '~x'
Right, I forgot we had that operator!
More information about the Python-ideas