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 eric.snow
Recipients barry, eli.bendersky, eric.snow, ethan.furman, pitrou
Date 2013-09-06.01:50:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1378432255.62.0.590790449674.issue18924@psf.upfronthosting.co.za>
In-reply-to
Content
> I would agree with Eli and Eric if it wasn't for that problem.

Agreed.  That was the gist of my question that led to Ethan's example.  If it's easy to accidentally break an enum, particularly in a subtle way, then it may not be worth taking a consenting adults approach.

Usually in consenting adults cases, it's simply not worth adding the extra complexity (or taking the time) to lock down an API or cover all the cases--it won't be a problem in practice since normal usage doesn't bear enough risk to worry about it.

In the case of enums, particularly in how they re-purpose classes and yet allow non-item attributes, there's a higher risk of accidentally breaking something during normal usage.  They quack like a class, but maybe they need to look less like a duck.  The question is, is the risk (and associated cost) of accidental breakage high enough to warrant the cost of being more heavy-handed?

> Also, we can first forbid overriding, then change our decision later
> on if someone comes with a use case (doing the converse would be more
> annoying as it would break compatibility).

+1
History
Date User Action Args
2013-09-06 01:50:55eric.snowsetrecipients: + eric.snow, barry, pitrou, eli.bendersky, ethan.furman
2013-09-06 01:50:55eric.snowsetmessageid: <1378432255.62.0.590790449674.issue18924@psf.upfronthosting.co.za>
2013-09-06 01:50:55eric.snowlinkissue18924 messages
2013-09-06 01:50:54eric.snowcreate