Help! File objects and scoping
bens
bs343 at you-know-where.ac.uk
Wed Jun 8 04:01:57 EDT 2005
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 would have built mmap, but I
can live with it.
Many thanks,
Ben
More information about the Python-list
mailing list