[issue16498] Unwanted link between volatile and shelve storage

2012-11-18 Thread Terry Cooper
Terry Cooper added the comment: Got your message before I got his. Thanks for the reference to python-list. -Original Message- >From: "R. David Murray" >Sent: Nov 18, 2012 9:39 PM >To: ttcoo...@indy.net >Subject: [issue16498] Unwanted link between volatile and

[issue16498] Unwanted link between volatile and shelve storage

2012-11-18 Thread R. David Murray
R. David Murray added the comment: If it "got it" from dBasis[163] via item assignment (say gList1[i1][1] = dBasis[163]), then yes, Python remembers that. Names just hold pointers to objects, so after that assignment gList1[i1][1] points to the same object as dBasis[163] does. If that object

[issue16498] Unwanted link between volatile and shelve storage

2012-11-18 Thread Terry Cooper
2012 2:07 PM >To: ttcoo...@indy.net >Subject: [issue16498] Unwanted link between volatile and shelve storage > > >Ezio Melotti added the comment: > >> They are obviously not the same record > >Have you tried printing gList1 and dBasis[

[issue16498] Unwanted link between volatile and shelve storage

2012-11-18 Thread Ezio Melotti
Ezio Melotti added the comment: Indeed. -- stage: -> committed/rejected status: pending -> closed ___ Python tracker ___ ___ Python-b

[issue16498] Unwanted link between volatile and shelve storage

2012-11-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> invalid status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue16498] Unwanted link between volatile and shelve storage

2012-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > dBasis = shelve.open('cFract2.tmp','n') > i,testVal,dBasis,oldTime = 0,1,{},int(time.clock()) # Initialize As I understand, you don't use shelve object at all (except creating an empty base). Such a lot of code has no relation to the bugs i

[issue16498] Unwanted link between volatile and shelve storage

2012-11-18 Thread Ezio Melotti
Ezio Melotti added the comment: > They are obviously not the same record Have you tried printing gList1 and dBasis[163], their repr and their ids? -- nosy: +ezio.melotti ___ Python tracker

[issue16498] Unwanted link between volatile and shelve storage

2012-11-18 Thread R. David Murray
R. David Murray added the comment: Any chance you could reduce this to a simpler test case? It may be a while before anyone gets around to analyzing your complete example. -- nosy: +r.david.murray ___ Python tracker

[issue16498] Unwanted link between volatile and shelve storage

2012-11-18 Thread Terry Cooper
New submission from Terry Cooper: The Python statement gList1[i1][1] += gList2[i2][1] modifies not only gList1 (a volatile storage object) but dBasis[163] (a record within shelve object dBasis). Both gList and dBasis[163] are printed before and after execution of the statement by cFract2.comb