Real Problems with Python

François Pinard pinard at iro.umontreal.ca
Sun Feb 13 10:05:06 EST 2000


"Tim Peters" <tim_one at email.msn.com> writes:

> >    In the long run, the solution is to use a conservative garbage
> >    collection algorithm (such as the Boehm collector),

> "No chance" in CPython [...]

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.

I'm not even sure I would much attracted by an implementation of Python
in which implied __del__ actions are much delayed, as this would force me
to add some more clutter to my Python code, which I prefer short and clear.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard






More information about the Python-list mailing list