PEP 285: Adding a bool type

Martin v. Loewis martin at v.loewis.de
Sat Mar 30 15:48:04 EST 2002


Peter Hansen <peter at engcorp.com> writes:

> So does this change proposes to change the readability so that
> it is clear at a glance (at the source, not the documentation, which
> seems an odd thing to base this on) that those functions return
> boolean conditions rather than integers?

The documentation should change as all, documenting that certain
functions return bool.

> If that is _all_ this change does, I suppose it would be okay.
> If it in _any way_ changes the functionality one can currently
> expect for those return values, such as the ability to use as
> indices into a sequence, then I'm still very -1.

Their type changes, and their repr. Apart from that, nothing changes.

> Furthermore, there will be code breakage, and that should always
> rate very high on the list of reasons to leave well enough alone.

Can you show examples of (real!) code that will break? Preferably code
you've written yourself.

Regards,
Martin



More information about the Python-list mailing list