Message236476
Expected the following code to change the value of the variable, it is not, comment are appreciated at this point.
GUMMIE_BEARS = ''
arr2 = { 'GUMMIE_BEARS' : GUMMIE_BEARS }
arr2['GUMMIE_BEARS'] = 'hello world'
print arr2['GUMMIE_BEARS']
print 'and this too' + GUMMIE_BEARS + '<---should be' # point #1
Expected output at point #1 should have 'hello world' contained within the string, it does not however.
# I note this description:
# Mutable variables – such as dictionaries and lists – are passed by reference,
# and so if your function accepts mutable argument, it may modify the contents of that mutable variable
# outside the scope of the function.
Thank You. |
|
Date |
User |
Action |
Args |
2015-02-24 04:51:45 | opensource3 | set | recipients:
+ opensource3 |
2015-02-24 04:51:45 | opensource3 | set | messageid: <1424753505.27.0.912963667947.issue23506@psf.upfronthosting.co.za> |
2015-02-24 04:51:45 | opensource3 | link | issue23506 messages |
2015-02-24 04:51:44 | opensource3 | create | |
|