Christopher Barker writes:
 > On Thu, Apr 2, 2020 at 6:07 AM Stephen J. Turnbull <
 > turnbull.stephen...@u.tsukuba.ac.jp> wrote:

 > > Yah, but you also get
 > 
 > >
 > >     outfile.seek(some_random_place)
 > >     outfile += something
 > >
 > 
 > Is that not exactly the same as what you can do with .write() now?

Yes.  But it flies in the face of the normal semantics of str '+='
(concatenate, not overwrite) while it's exactly how seekable writable
streams have worked since the '70s.

I just don't ever want to see that, but I know I will.  YMMV, I think
it's too high a price to pay for syntactic sugar.  I wouldn't have the
same objection to a standalone StringBuilder class (I have other
objections to that, see Paul Moore's post on multiple TOOWTDI).
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/5HXF6ROFB76GW3AB36DCA7BSCZZL3GQ2/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to