Issue 35986: print() documentation typo? (original) (raw)

Issue35986

Created on 2019-02-13 12:26 by 李笑来, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
print_screenshot.png matrixise,2019-02-13 14:05
Messages (8)
msg335428 - (view) Author: 李笑来 (李笑来) Date: 2019-02-13 12:26
print(), default value sep, should be ' '(one space), rather than an empty str, ''.
msg335429 - (view) Author: 李笑来 (李笑来) Date: 2019-02-13 12:28
sep argument default value should be ' '(a space), rather than ''(an empty string).
msg335434 - (view) Author: Steven D'Aprano (steven.daprano) * (Python committer) Date: 2019-02-13 12:45
Which documentation are you referring to? The docstring says: print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False) which is clearly a space. The docs here: https://docs.python.org/3/library/functions.html#print say something very similar: print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False) but it is really hard to see the space on the website unless you look very carefully, because the font used is a proportional font instead of a monospaced font. So the space shown is a tiny little sliver of whitespace. But if you copy and paste the function signature into your text editor, or somewhere you can set the font to use a fixed-width programmers font, you will see that there definitely is a space there. So not a typo, but possibly a poor choice of font. It might be nice to rethink the choice of font for parameter lists.
msg335443 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2019-02-13 14:05
@steven I have a solution with a css selector if we update the python-docs theme for Sphinx. You can check my screenshot
msg335602 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2019-02-15 12:03
This was fixed with https://github.com/python/python-docs-theme/pull/25 by @matrixise.
msg335603 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2019-02-15 12:13
Thanks @cheryl but we need to have a new package of python-docs-theme.
msg335611 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2019-02-15 13:43
Yes, but I thought that would be up to @theacodes to release a new version of python-docs-theme to PyPI? Since the last release was 6 months ago and the previous one to that was February 2018, I was hoping the new release would come soon. In any event, I didn't think there was anything else that could be done on this issue, which is why I closed it. Is there something that needs to be updated in the CPython repository?
msg335613 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2019-02-15 13:45
not in the CPython repo, just ask to regenerate the PyPI package. thanks
History
Date User Action Args
2022-04-11 14:59:11 admin set github: 80167
2019-02-15 13:45:36 matrixise set messages: +
2019-02-15 13:43:25 cheryl.sabella set messages: +
2019-02-15 12:13:45 matrixise set messages: +
2019-02-15 12:03:53 cheryl.sabella set status: open -> closedversions: + Python 3.8nosy: + cheryl.sabellamessages: + resolution: remind -> third partystage: resolved
2019-02-13 14:05:47 matrixise set files: + print_screenshot.pngnosy: + matrixisemessages: +
2019-02-13 12:45:54 steven.daprano set nosy: + steven.dapranomessages: +
2019-02-13 12:28:00 李笑来 set resolution: remindmessages: +
2019-02-13 12:26:53 李笑来 create