Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue38495

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:print built-in function docs bug
Type:enhancementStage:resolved
Components:DocumentationVersions:Python 3.9, Python 3.8, Python 3.7, Python 3.6, Python 3.5
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: docs@pythonNosy List: Alex Mashianov, docs@python, mdk, methane, serhiy.storchaka, xtreak
Priority:normalKeywords:easy

Created on2019-10-16 07:36 byAlex Mashianov, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
Screenshot_2020-01-22 Fonctions natives — Documentation Python 3 8 1.pngmdk,2020-01-22 17:23
Pull Requests
URLStatusLinkedEdit
PR 17062closedpython-dev,2019-11-05 14:23
Messages (7)
msg354778 -(view)Author: Alex Mashianov (Alex Mashianov)Date: 2019-10-16 07:36
Python docs says print() function default sep='':http://joxi.ru/EA44JnfonNwLAb.pngWhile in reality sep=' ':http://joxi.ru/n2YXyRsbw6oYm6.pngProbably it's a bug with space not being escaped in html to prevent trimming.
msg354782 -(view)Author: Karthikeyan Singaravelan (xtreak)*(Python committer)Date: 2019-10-16 08:16
In the sphinx source it's ' ' so maybe it's a problem with the rendering part.https://raw.githubusercontent.com/python/cpython/master/Doc/library/functions.rst.. function:: print(*objects, sep=' ', end='\\n', file=sys.stdout, flush=False)
msg354783 -(view)Author: Inada Naoki (methane)*(Python committer)Date: 2019-10-16 08:31
Space is not trimmed. You can confirm there is a space by copy&paste it from rendered HTML.  print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False)¶So this is caused by rendering <em>sep=' '</em>.I don't like <em>, but I'm not sure this can be customized by theme.
msg354789 -(view)Author: Inada Naoki (methane)*(Python committer)Date: 2019-10-16 08:57
https://github.com/sphinx-doc/sphinx/pull/6401/filesRecent Sphinx uses <em>.So we can add style like this:  .sig-paren {    font-family: monospace, sans-serif;    font-style: normal;  }
msg354792 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2019-10-16 09:40
Maybe just explain defaults in the text?   Print *objects* to the text stream *file* (the standard output by default), separated by *sep* (a space by default) and followed   by *end* (a newline by default).
msg360489 -(view)Author: Julien Palard (mdk)*(Python committer)Date: 2020-01-22 17:23
PR 17062 about stating it's a space by default has been rejected.I also feel we should just enhance the space width in the prototype.I personally see the space, but as it's in italic, I can understand it's very easy to miss it.I like the `font-family: monospace, sans-serif; font-style: normal;` a lot, it make it clear, see screenshot, but it's an issue for python-docs-theme, opening it there:https://github.com/python/python-docs-theme/issues/42
msg381020 -(view)Author: Julien Palard (mdk)*(Python committer)Date: 2020-11-15 16:26
Hi!Thanks Alex for reporting, and everyone involved.This has been fixed in python-docs-theme, so it's fixed for >=3.8. As 3.7 is in security-only (and embeds python-docs-theme), better not touch it.Bests.
History
DateUserActionArgs
2022-04-11 14:59:21adminsetgithub: 82676
2020-11-15 16:26:58mdksetstatus: open -> closed
resolution: fixed
messages: +msg381020

stage: patch review -> resolved
2020-01-22 17:23:06mdksetfiles: +Screenshot_2020-01-22 Fonctions natives — Documentation Python 3 8 1.png

nosy: +mdk
messages: +msg360489

keywords: +easy, -patch
2019-11-05 14:23:18python-devsetkeywords: +patch
stage: patch review
pull_requests: +pull_request16570
2019-10-16 09:40:38serhiy.storchakasetnosy: +serhiy.storchaka
messages: +msg354792
2019-10-16 08:57:55methanesetmessages: +msg354789
2019-10-16 08:31:27methanesetnosy: +methane
messages: +msg354783
2019-10-16 08:16:16xtreaksetnosy: +xtreak
messages: +msg354782
2019-10-16 07:36:41Alex Mashianovcreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2025 Movatter.jp