Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Marko Rauhamaa Newsgroups: comp.lang.python Subject: Re: Status of side-effecting functions in python Date: Tue, 28 Oct 2014 11:10:07 +0200 Organization: A noiseless patient Spider Lines: 14 Message-ID: <87tx2otv9s.fsf@elektro.pacujo.net> References: <438d510f-05ae-47dd-bcda-42a8b777c99b@googlegroups.com> <683c84d8-d916-4b63-b4b2-92cd2763e260@googlegroups.com> <544e2cf2$0$13009$c3e8da3$5496439d@news.astraweb.com> <87bnoxv91p.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="ff5cf27ef3d5b31f034d3b72bdc27a41"; logging-data="32476"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19hP0qeQr3SWHiXJu6gOwBL" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:PmHrkMhlG2Rm4Jtl0kzqw8yUGOI= sha1:4MONI6F75E8eThKekDc7c1MZRX4= Xref: csiph.com comp.lang.python:79831 Marko Rauhamaa : > Python's sockets and pipes don't have write methods. Actually, that's mistaken as well. The sys.std* handles and pipes returned by subprocess are accessed using file.write() and thus may return partial writes. That brings up another point: Python3's file.write() returns the number of characters written. What might it return if a partial character should be written? Marko