Python and Schools
Steven Taschuk
staschuk at telusplanet.net
Thu Apr 17 15:29:19 EDT 2003
Quoth Tim Peters:
> [David Eppstein]
[...]
> > allocate array A, of dimension n**2, WITHOUT INITIALIZING IT
> > (is this possible in pure python?)
>
> It shouldn't be possible: if you find a way to do it, it would be
> considered a security bug. No memory is really uninitialized -- if Python
> gave you read access to n**2 bytes in constant time, it would be revealing
> to you the state left behind by some other function (or user, or process).
Hm... it doesn't have to let us *read* from the uninitialized
memory. Just as long as it lets us write to it, and later read
from the spots we've written to.
This is of dubious usefulness, of course.
--
Steven Taschuk staschuk at telusplanet.net
"I'm always serious, never more so than when I'm being flippant."
-- _Look to Windward_, Iain M. Banks
More information about the Python-list
mailing list