This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: print() documentation typo?
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.8, Python 3.7
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: docs@python Nosy List: cheryl.sabella, docs@python, matrixise, steven.daprano, 李笑来
Priority: normal Keywords:

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

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:

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

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
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
Date User Action Args
2022-04-11 14:59:11adminsetgithub: 80167
2019-02-15 13:45:36matrixisesetmessages: + msg335613
2019-02-15 13:43:25cheryl.sabellasetmessages: + msg335611
2019-02-15 12:13:45matrixisesetmessages: + msg335603
2019-02-15 12:03:53cheryl.sabellasetstatus: open -> closed

versions: + Python 3.8
nosy: + cheryl.sabella

messages: + msg335602
resolution: remind -> third party
stage: resolved
2019-02-13 14:05:47matrixisesetfiles: + print_screenshot.png
nosy: + matrixise
messages: + msg335443

2019-02-13 12:45:54steven.dapranosetnosy: + steven.daprano
messages: + msg335434
2019-02-13 12:28:00李笑来setresolution: remind
messages: + msg335429
2019-02-13 12:26:53李笑来create