Path: csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'problem:': 0.07; 'aliases': 0.09; 'satisfy': 0.09; 'python': 0.11; 'jan': 0.12; '23,': 0.16; 'distinct': 0.16; 'entities.': 0.16; 'enum': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'import': 0.22; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; '>>>>': 0.31; 'class': 0.32; 'fri,': 0.33; 'received:google.com': 0.35; 'to:addr:python- list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'tell': 0.60; '2015': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=SLx2Qpf76+RstBmni0FFGiKRcGROTRNJHAcGuR/mjts=; b=yxUNTemIyLXUEga0SKFaoi0ZZN5tIxQiZX+8dcLpAL8MB9q6Mp0OSaKXgjPz7heRdb hwBYJB5B+GbZ9qKPAj0iIe2Sb2keC4WD4HGz77i4If2clGOVqz6bzGtJ0uov1OGg15tc rUaah0gc1CY4HG4Z+gNBo9MCirT7/mmzf4soyi8IbrKgXHVA2QThj+865BqKzSDShkGU Kxk5tKxlobpEMh7O791X6tBFbfevLsN55dJUAMPYBlSOHeWK386kVl0HwzxSTEClZQ9r r8zXZUMbmOrItHRj88gcQOYzKOTp02RrFLj7nNSvO77BVHtETEKdwiF30gpo0wujzv0r zGug== X-Received: by 10.70.130.205 with SMTP id og13mr12824863pdb.72.1422031894768; Fri, 23 Jan 2015 08:51:34 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <54ABB88A.7070504@r3dsolutions.com> <54ABC52A.1050507@davea.name> <54ABE383.3020801@r3dsolutions.com> <54AC97D9.4010504@r3dsolutions.com> <54ACAA04.60801@r3dsolutions.com> <54ADC99F.3020405@stoneleaf.us> <54B44A64.7010105@r3dsolutions.com> <54b4aded$0$2738$c3e8da3$76491128@news.astraweb.com> <54B5B486.7080406@r3dsolutions.com> <54B72D32.3090209@r3dsolutions.com> <54B76B0A.7050706@r3dsolutions.com> From: Ian Kelly Date: Fri, 23 Jan 2015 09:50:54 -0700 Subject: Re: Comparisons and sorting of a numeric class.... To: Python Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1422031904 news.xs4all.nl 2930 [2001:888:2000:d::a6]:41930 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:84353 On Fri, Jan 23, 2015 at 8:31 AM, Rustom Mody wrote: > Can you tell me what of the following code does not satisfy your requirements? > [Needs python 3.4] > > >>>> from enum import IntEnum >>>> class B4(IntEnum): > F1 = 0 > F2 = 0 > F3 = 0 > T = 1 This strikes me as a potential problem: >>> B4.F1 is B4.F2 is B4.F3 True >>> list(B4) [, ] Enum members with the same values are just aliases for one another, not distinct entities.