Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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.150 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.73; '*S*': 0.03; 'attribute': 0.07; 'expected.': 0.09; 'python': 0.11; 'renamed': 0.16; 'wrote:': 0.18; 'replacing': 0.19; 'examples': 0.20; 'seems': 0.21; 'example': 0.22; 'looks': 0.24; 'van': 0.27; 'header:In-Reply- To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'probably': 0.32; 'url:python': 0.33; 'updated': 0.34; 'received:google.com': 0.35; 'in:': 0.36; 'url:org': 0.36; 'should': 0.36; 'to:addr:python- list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'either': 0.39; 'name': 0.63; '30,': 0.65; 'here': 0.66; 'detail.': 0.68; 'jul': 0.74; 'self.value': 0.84; 'url:cpython': 0.84; 'url:rev': 0.84; '2013': 0.98 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=v+jPByzBiDKyNlQdfvYXDe2eSKmaL7sbZkzfG2k8mzs=; b=V6k03yvtlGjny4NVsD7m5A0TTMOZHTYeTnxusVD2sDVi3c1/rym9jY5dA1hfL5aD0v LlcmI6+/bTi++eRf5gyhYg45BBTRXjJGS0r63MnjKV+PPgorcZQF6CdLMKYI+b4AWaJ2 Ozps4DkuenkjsG2xDIvtAux4zz2fC7EB2IhJjE5XkKoK6hiMArKxt2e2Pppv+xykrjoP nTj/HQmEdSpybDnvbpWjZ7ptsHv9a8/WePuavYUhDJR5A/axzaNlZwFK6fb6YY5OO/kS AZXckvMV+Q1FOawQe+38O4KqOj9WJldxauLdDkB1oJL8rPGCFyn+Z+ZdEE+qcKyyMZ8s CtXw== X-Received: by 10.66.228.38 with SMTP id sf6mr867847pac.21.1375210748087; Tue, 30 Jul 2013 11:59:08 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <51f8036c$0$2995$6d4158fb@reader.xsnews.nl> References: <51f8036c$0$2995$6d4158fb@reader.xsnews.nl> From: Ian Kelly Date: Tue, 30 Jul 2013 12:58:27 -0600 Subject: Re: OrderedEnum examples To: Python Content-Type: text/plain; charset=ISO-8859-1 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1375210751 news.xs4all.nl 15953 [2001:888:2000:d::a6]:34252 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51596 On Tue, Jul 30, 2013 at 12:18 PM, Bas van der Wulp wrote: > Replacing each occurrence of self._value with either self._value_ or > self.value in the examples seems to make them work as expected. > > Are both examples incorrect, or not intended to work in Python 2.x? The _value attribute was renamed _value_ in: http://hg.python.org/cpython/rev/511c4daac102 It looks like the example wasn't updated to match. You should probably just use self.value here since the name of the private attribute is an implementation detail.