Closed GoogleCodeExporter closed 9 years ago
It is actually proper for v to be discovered by a function if it is only
"read-only"
In this case, it finds it (for reading) but when it goes to write to it, it changes
the variable use to a local variable. During that change it should notice and
raise
an exception.
I've changed the summary to reflect this a bit better.
Original comment by philhas...@gmail.com
on 4 Jun 2008 at 3:47
Actually, what Python seems to be doing is a bit more complex. It seems to be
looking
ahead into the function to see if v gets written to anywhere inside it and if it
does, it raises an exception on the first read (the first print) and NOT the
first write.
Original comment by denis.ka...@gmail.com
on 13 Jun 2008 at 3:16
Original comment by philhas...@gmail.com
on 5 Sep 2008 at 5:15
Original comment by philhas...@gmail.com
on 6 Sep 2008 at 8:02
Original issue reported on code.google.com by
dwhall...@gmail.com
on 4 Jun 2008 at 3:42