Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #33181
| Date | 2012-11-12 14:40 +0100 |
|---|---|
| From | "F.R." <anthra.norell@bluewin.ch> |
| Subject | Re: Strange object identity problem |
| References | <50A0F5A8.4080802@bluewin.ch> <CA+mXAjLr=gNz1fVNTXrF_+EB-oGY1ZDLrzficg5N=oJpDj2jeg@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3586.1352727727.27098.python-list@python.org> (permalink) |
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 | Next — Next in thread | Find similar | Unroll 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