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

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Sep 22 02:06:10 CEST 2011

Guido van Rossum wrote:

> Yeah, I'd like to see the new generated code. If it's even a single
> opcode longer than the old code, that's a big cost that everybody pays

In the prototype implementation it is slightly longer
in some cases, but if we're willing to introduce a few
more bytecode instructions it could be made the same

I'll see about adding some discussion on this to the

Concerning examples, there's already one included with
the patch file, but it's not very visible anywhere.

Would you like the examples included in-line in the PEP
(they will be about 2-3 screenfuls each or so) or would
it be better to host them elsewhere and just put links
in the PEP?


More information about the Python-ideas mailing list