Python 2.0 (perhaps off topic)
jeremy at cnri.reston.va.us
Wed Jun 2 05:50:46 CEST 1999
>>>>> "PP" == Paul Prescod <paul at prescod.net> writes:
PP> Jeremy Hylton wrote:
>> I don't think this is a good example. Even beginning users are
>> going to have to learn a little about resource management about
>> some point. People should not rely on files getting deallocated
>> and closed by Python. All the beginners who start with JPython
>> are going to get Java's GC. And they're going to need to close
>> the files by hand.
PP> It looks like this conversation has come all of the way
PP> around. We are talking about whether the JVM should be the
PP> default, standard Python distribution platform. It isn't fair,
PP> then, to use the flaws in the JVM version of Python to argue FOR
PP> that change.
Perhaps this is what I get for jumping in in the middle of a
conversation without learning how it got started. The example I was
responding to depended on file object being immediately finalized to
avoid leaking file descriptors.
It isn't a flaw in JPython that performs differently. It's just a
difference. Your skate on thin ice when you write code that depends
on implementation issues rather than the language spec. It may be
fine if you know what you're doing (love those bytecodehacks!), but
it's hardly something you want to encourage a beginner to do.
Of course, the implementation was sometimes posing as the language
spec until JPython came along.
PP> "Oh well, we'll lose compatibility with PIL but JPython users
PP> have alreadly lost that so I guess it isn't a big deal."
Tilt away <wink>. I took issue with your non-explicit close of a
file, and didn't say anything about the merits of JPython
vs. CPython. See my earlier post in this thread. I think I was
unequivocal in my belief that the next version of Python needed to be
in C or C++.
More information about the Python-list