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

Nick Coghlan ncoghlan at gmail.com
Thu Sep 15 06:36:42 CEST 2011

On Thu, Sep 15, 2011 at 2:22 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> On 14/09/11 05:56, Guido van Rossum wrote:
>> Certainly the NumPy folks have
>> repeatedly claimed that they are fine with the status quo.
> 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.
> Apologies if I appear to be flogging a resting equine here. If
> you really don't want to think about it any more, I'll shut up.
> But if it's going to be rejected, I'd prefer it to be rejected
> for genuine reasons rather than FUD.

Some concrete use cases might help a lot. While such use cases can
also be addressed via AST transformations, that's a rather large
sledgehammer to break out just to customise some boolean logic.

I'll hold off on marking the PEP as rejected until you've add a chance
to add (and Guido has had a chance to read) those examples.


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-ideas mailing list