Why no open(f, "w").write()?

François Pinard pinard at iro.umontreal.ca
Thu May 30 11:18:59 EDT 2002


[Delaney, Timothy]

> > From: Donn Cave [mailto:donn at drizzle.com]

> > The real Python _is_ implementation.  We all know that you actually
> > can rely on timely finalization, and we can guess why the 
> > documentation says what it says.

> Then get it documented to say that it can be relied on, now and forever.

That would be ideal, indeed.  Despite my current choices, there is always a
tiny, unlikely risk that Python changes his behaviour on this, despite what
I was told, and I would surely prefer not have to revise the code I wrote.
But if I ever have to revise it, for Jython or otherwise, I will be happy
having enjoyed the current legibility and simplicity for a long while!

Once again, I would not have started depending on immediate finalisation
before getting a confirmation of some sort that it is dependable.  On one
hand, I've always have been strict, anal, at using only documented features,
in all systems and languages I've used in my life.  On the other hand, in
this precise case, the advantages were so appealing that I felt compelled
to ask for clarification about the dependability of immediate finalisation.

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






More information about the Python-list mailing list