Closures in leu of pointers?

cts.private.yahoo at gmail.com cts.private.yahoo at gmail.com
Sat Jun 29 07:44:15 EDT 2013


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



More information about the Python-list mailing list