Hi Collin, > Unrelated to the newline change itself, but something I noticed that I > would like to bring up: > > def lines_to_multiline(lines): > '''lines_to_multiline(List[str]) -> str > > Combine the lines to a single string, terminating each line with a newline > character.''' > > In new functions, I have been prefering adding Python 3.7+ type hints > and omitting the repeated function name in doc strings. Like this: > > # 'List' requires from __future__ import annotations > def lines_to_multiline(lines: List[str]) -> str: > '''Combine the lines to a single string, terminating each line with a > newline > character.''' > > I figured that, once gnulib-tool.py has most/all of it's features > ready, we could do this to the existing functions as code clean up.
Yes, we can do that. In the commit today, however, I wanted to close one issue without possibly opening another one. > Before making that change, it might be worth formalizing doc string > conventions. Right now we use three single quotes and a style similar > to those described in the GNU Coding standards [1]: > > /* This is a C comment. > New line. */ > > '''This is a Python comment. > New line.''' > > I don't have strong opinions on the matter, but it is worth mentioning > that some documentation tools such as Docutils or Sphinx expect > certain formats [2] [3]. It is also worth testing various editors (gedit, kate, emacs, eclipse, PyCharm, etc.): Where do they put the cursor when you have the cursor here: '''This is a Python comment.█ and press Enter? Bruno