Real Problems with Python

Martin von Loewis loewis at informatik.hu-berlin.de
Mon Feb 14 17:33:13 CET 2000


François Pinard <pinard at iro.umontreal.ca> writes:

> I'm not sure of the implications of the above, but one sure thing is that I
> very much like the current implications of reference counting.  When I write:
> 
>     for line in open(FILE).readlines():
> 
> I rely on the fact FILE will automatically get closed, and very soon since
> no other references remain.  I could of course use another Python line for
> opening FILE, and yet another for explicitely closing it, as I was doing
> in my first Python days, but I learned to like terse writings like above,
> and I do not think there is any loss in legibility in this terseness.

Indeed. I think Tim's right here (as always:); if the request for
garbage collection is rephrased as 'reclaim cycles', everybody will be
happy.

Regards,
Martin



More information about the Python-list mailing list