On 06/29/2013 05:44 AM, cts.private.ya...@gmail.com wrote: > Alas, one reason it's a weak workaround is that it doesn't work - at least, > not how I wish it would: > > > $ cat ptrs > > x = 34 > > def p1 (a1): > > a1[0] += 12 > > p1 ([x]) > > print (x) > > $ python ptrs > 34
you'll have to use it more like this (and also changing your names to be a bit more sane): x = [ 34, ] def test_func( out ): out[0] += 12 test_func(x) print (x) -- http://mail.python.org/mailman/listinfo/python-list