This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ethan.furman
Recipients ethan.furman, gregory.p.smith, novas0x2a, python-dev, r.david.murray, serhiy.storchaka
Date 2016-01-15.21:17:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1452892647.7.0.867639533631.issue24840@psf.upfronthosting.co.za>
In-reply-to
Content
Mike, my apologies.  In the future I'll make sure and read the docs before I go through with changes.

In the docs (https://www.python.org/dev/peps/pep-0435/#id35):

    The reason for defaulting to 1 as the starting number and
    not 0 is that 0 is False in a boolean sense, but enum members
    all evaluate to True.

From a newer discussion on Python Ideas and Python Dev:

Barry Warsaw:
    I think in general enums are primarily a symbolic value and don't
    have truthiness.  It's also so easy to override when you define
    the enum that it's not worth changing the current behavior.

Guido van Rossum:
    Honestly I think it's too late to change. The proposal to change
    plain Enums to False when their value is zero (or falsey) would
    be a huge backward incompatibility. I don't think there's a reasonable
    path forward, and also don't think there's a big reason to regret
    the current semantics.

Thank you, Gregory, for catching that.
History
Date User Action Args
2016-01-15 21:17:27ethan.furmansetrecipients: + ethan.furman, gregory.p.smith, r.david.murray, python-dev, serhiy.storchaka, novas0x2a
2016-01-15 21:17:27ethan.furmansetmessageid: <1452892647.7.0.867639533631.issue24840@psf.upfronthosting.co.za>
2016-01-15 21:17:27ethan.furmanlinkissue24840 messages
2016-01-15 21:17:27ethan.furmancreate