This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author opensource3
Recipients opensource3
Date 2015-02-24.04:51:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1424753505.27.0.912963667947.issue23506@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-02-24 04:51:45opensource3setrecipients: + opensource3
2015-02-24 04:51:45opensource3setmessageid: <1424753505.27.0.912963667947.issue23506@psf.upfronthosting.co.za>
2015-02-24 04:51:45opensource3linkissue23506 messages
2015-02-24 04:51:44opensource3create