Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #33181

Re: Strange object identity problem

Path csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <anthra.norell@bluewin.ch>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.010
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'space.': 0.07; 'restarted': 0.09; 'clash': 0.16; 'idle.': 0.16; 'paused': 0.16; 'received:195.186': 0.16; 'received:bluewin.ch': 0.16; 'subject:object': 0.16; 'wrote:': 0.17; "shouldn't": 0.17; '(b)': 0.22; 'exists.': 0.22; 'subject:problem': 0.22; 'cheers,': 0.23; 'somewhere': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'reflect': 0.27; 'that.': 0.30; 'year,': 0.30; 'more,': 0.32; 'print': 0.32; 'problem': 0.33; 'to:addr:python- list': 0.33; 'thanks': 0.34; 'robert': 0.35; 'pm,': 0.35; 'there': 0.35; 'should': 0.36; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'range': 0.60; 'received:ch': 0.69
Date Mon, 12 Nov 2012 14:40:59 +0100
From "F.R." <anthra.norell@bluewin.ch>
User-Agent Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121028 Thunderbird/16.0.2
MIME-Version 1.0
To python-list@python.org
Subject Re: Strange object identity problem
References <50A0F5A8.4080802@bluewin.ch> <CA+mXAjLr=gNz1fVNTXrF_+EB-oGY1ZDLrzficg5N=oJpDj2jeg@mail.gmail.com>
In-Reply-To <CA+mXAjLr=gNz1fVNTXrF_+EB-oGY1ZDLrzficg5N=oJpDj2jeg@mail.gmail.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3586.1352727727.27098.python-list@python.org> (permalink)
Lines 41
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1352727727 news.xs4all.nl 6947 [2001:888:2000:d::a6]:42102
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:33181

Show key headers only | View raw


On 11/12/2012 02:27 PM, Robert Franke wrote:
> Hi Frederic,
>
> [...]
>
>>>>> bas = {}
>>>>> for year in range (2010, 2013):
>>      ba = st.runs ('BA', '%d-01-01' % year, '%d-12-31' % year)
>>      ba.run ()
>> print year, id (ba)
>>      bas [year] = ba
>>
>> 2010 150289932
>> 2011 150835852
>> 2012 149727788
>>
>>>>> for y in sorted (bas.keys ()):
>>      b = bas [year]
> Shouldn't that be b = bas[y]?
Yes, it should, indeed! What's more, I should have closed and restarted 
IDLE. There must have
been a name clash somewhere in the name space. The problem no longer 
exists. Sorry
about that. And thanks to all who paused to reflect on this non-problem. 
- Frederic.

>
>
>>      print y, id (b)
>>
>> 2010 149727788
>> 2011 149727788
>> 2012 149727788
>>
> [...]
>
> Cheers,
>
> Robert
>

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Strange object identity problem "F.R." <anthra.norell@bluewin.ch> - 2012-11-12 14:40 +0100
  Re: Strange object identity problem duncan smith <buzzard@invalid.invalid> - 2012-11-12 17:02 +0000
    Re: Strange object identity problem "F.R." <anthra.norell@bluewin.ch> - 2012-11-13 08:08 +0100

csiph-web