On Mon, May 07, 2007 at 08:59:21PM +0200, Enrico Scholz wrote:
> Michael E Brown <[EMAIL PROTECTED]> writes:
>
> >> - rpmmacros.close()
> >
> > You just removed the close() on the macros file. This was probably not
> > intended.
>
> No; it was intended. As a C++ developer I trust into (C)Python's reference
> counting + stack unwinding. Most python developers are doing this too, or
> why are they not writing
>
> | f = open("...")
> | try:
> | ...
> | finally:
> | f.close()
Actually... I believe that this is part of the motivation of the new
'with' keyword.
Also, when you use the automatic garbage collection, the file might not
be closed until much later. I have seen some discussion on this causing
problems, especially on alternative python interpreter
implementations... eg. Jython.
I would prefer that we keep the close().
Thanks,
Michael
--
Fedora-buildsys-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/fedora-buildsys-list