Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit89b744a

Browse files
miss-islingtonEtiennePelletierambv
authored
[3.14]gh-125225: Fix column misalignment in help('topics') output (gh-125226) (gh-134225)
The 'help("topics")' output was misaligned due to "ASSIGNMENTEXPRESSIONS"exceeding the implicit maximum default column width of 19 characters.Reduced the number of columns from 4 to 3 in the listtopics()function to allow more space for longer topic names.(cherry picked from commitb22460c)Co-authored-by: Étienne Pelletier <EtiennePelletier@users.noreply.github.com>Co-authored-by: Łukasz Langa <lukasz@langa.pl>
1 parentc869898 commit89b744a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎Lib/pydoc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2110,7 +2110,7 @@ def intro(self):
21102110
self.output.write(_introdoc())
21112111

21122112
deflist(self,items,columns=4,width=80):
2113-
items=list(sorted(items))
2113+
items=sorted(items)
21142114
colw=width//columns
21152115
rows= (len(items)+columns-1)//columns
21162116
forrowinrange(rows):
@@ -2142,7 +2142,7 @@ def listtopics(self):
21422142
Here is a list of available topics. Enter any topic name to get more help.
21432143
21442144
''')
2145-
self.list(self.topics.keys())
2145+
self.list(self.topics.keys(),columns=3)
21462146

21472147
defshowtopic(self,topic,more_xrefs=''):
21482148
try:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp