how to count lines in a file ?

Donn Cave donn at drizzle.com
Fri Jul 26 00:02:11 EDT 2002


Quoth Richard Jones <rjones at ekit-inc.com>:
| On Fri, 26 Jul 2002 12:45 am, Alex Martelli wrote:
...
|> [alex at lancelot jython-2.1]$ jython
|> Jython 2.1 on java1.4.0_01 (JIT: null)
|> Type "copyright", "credits" or "license" for more information.
...
|> I exited the interactive interpreter with a clean, normal
|> control-D, but as you see file aname was created but its
|> contents not written.

| I think the major problem that we're running into here is that before there 
| was GC, the refcounting-based cleanup of objects was clear, straight-forward 
| and reliable. Now it's not clear when objects are cleared up. That's a fairly 
| major problem for some of us old-timers (and, quite possibly, a lot of 
| newbies) to come to terms with. I hadn't realised that GC threw such a big, 
| ugly spanner in the works :(

Hm, I wouldn't have drawn the picture that way.  As I understand it,
the garbage collection changes to the C Python that we use have not
compromised its reference count driven behavior at all.

You're just looking at the other Python there, Jython.  Its object
lifetime policy is Java's, and that doesn't support timely finalization.
There's your spanner.

	Donn Cave, donn at drizzle.com




More information about the Python-list mailing list