On Tue, Jul 13, 2021 at 08:59:21AM -0700, Guido van Rossum wrote:
> Let's leave poor writelines alone. It's an old API, if you want something
> different, there are a zillion other ways (e.g. print(*x, sep="\n") ).
> 
> I wonder how much research the OP did before they claimed "writelines is a
> very big misnomer to many python developers".

I don't know about research, but the API certainly fools me. I don't 
consider the delimiter at the end of the line (the newline) to be part 
of the line, so whenever I used readlines and writelines I am invariably 
surprised by the fact that writelines requires the newlines to already 
be there.

I'm also surprised that there's a readline but no writeline :-)


-- 
Steve
_______________________________________________
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/NNY75OMPDYHG2RSCUGDJSY7PWGF4JFEN/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to