I am trying to build a list of dictionaries for the report writer and have
run into a strange one.  I need to build multiple records with some
duplicated data.  
 
1) rcd is my "template" record and I append it to the list (rcdlist).
2) I change the value of 'status' in the dictionary and append it to
rcdlist.
3) When I do, it appends a new dictionary item to the list, but then it also
changes all values of 'status'  to 'something else' in all the lists
dictionaries !?
 
Any comments would be most appreciated.
 
Thanks,
Larry Long
 
#1
rcdlist=[]
rcd={'assigned': True, 'status': 'ASSIGNED TO CLASS ID: 10762 - 09/12/2009',
'enrollid': 27531, 'cname': u'Adams, Andrew                   '}
print rcd
rcdlist.append(rcd)
print rcdlist

#2
rcd['status']='somthing else'
print rcd
rcdlist.append(rcd)
print rcdlist



--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAafA2fnYuPUOMNFpIYnBEQcKAAAAQAAAASaenlEZqd06FcMIel/[email protected]

Reply via email to