Dave Benjamin wrote:
> Here's the problem: the "mmap" object doesn't have a reference to
> "somefile", only to its file descriptor number. So, when getfile() goes
> out of scope, there are no references left, and the file gets closed
> automatically.
That makes a lot of sense. It's now how I woul
reated in a local scope and returned.
Why does that make a difference?
The strangest thing about this, I think, is that the error printed out
above, EnvironmentError, is listed in the docs under "only used as base
classes for other exceptions". In other words, it's never supposed to
be