how to count lines in a file ?

Fredrik Lundh fredrik at pythonware.com
Sat Jul 27 03:48:48 EDT 2002


Tim Peters wrote:

> That isn't "a change", though.  These three have always been true, and still
> are:
>
> 1. CPython uses refcounting.
>
> 2. Jython doesn't.
>
> 3. Python's Language Reference manual doesn't define when unreachable
>    objects are collected, and explicitly warns that an implementation
>    may even choose never to collect unreachable objects; it "strongly
>    recommends" to invoke close()-like methods rather than just hope.
>
> None of those are likely to change, either <wink>.

on the other hand, I see no reason why the Jython implementation
shouldn't make a "best attempt" to flush file buffers when the inter-
preter exits in a controlled fashion.

cpython guarantees this (thanks to stdio), so why cannot jython try
a little harder?

how many lines of code can it take?  twenty?

</F>





More information about the Python-list mailing list