How do you FTP ASCII if ftplib strips CR?

François Pinard pinard at iro.umontreal.ca
Tue Jun 13 22:29:28 EDT 2000


[echuck at mindspring.com]

> By losing access to the file object returned by open(), it gets gc'ed
> and therefore closed and flushed immediately.  You only have to worry
> about standalone open() calls if you use JPython or think you will someday.

That property of Python allows for _so_ nice code simplification, and
increase in simplicity and legibility, that we cannot just ignore it.
I'm not myself asserting that the Python reference does not specify this
behaviour, but someone else on this list did :-).  Yet, I would much like
being able to say that the Python reference does specify it, as I would
feel less guilty relying so much on it. :-)

The price to pay, and I know it, is that if I ever go to JPython, I will
have to carefully revise many things.  I'm ready to risk paying that price.

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






More information about the Python-list mailing list