diff options
author | shadchin <shadchin@yandex-team.com> | 2024-08-17 21:51:59 +0300 |
---|---|---|
committer | shadchin <shadchin@yandex-team.com> | 2024-08-17 22:04:51 +0300 |
commit | ee9edbd8878888bafcd0eeb3b528f3ec4311560b (patch) | |
tree | d54d8138e50a446904f10a2092719be86af011b7 /contrib/tools/python3/Lib/pydoc.py | |
parent | 72cbe4bad58add0912623ba51351ff1db8587249 (diff) | |
download | ydb-ee9edbd8878888bafcd0eeb3b528f3ec4311560b.tar.gz |
Update Python 3 to 3.12.5
https://docs.python.org/release/3.12.5/whatsnew/changelog.html#python-3-12-5-final
de86cdeacd3a8653b9ec36e87975886fafcf6dc2
Diffstat (limited to 'contrib/tools/python3/Lib/pydoc.py')
-rwxr-xr-x | contrib/tools/python3/Lib/pydoc.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/tools/python3/Lib/pydoc.py b/contrib/tools/python3/Lib/pydoc.py index 9a8812392a..e3745e5453 100755 --- a/contrib/tools/python3/Lib/pydoc.py +++ b/contrib/tools/python3/Lib/pydoc.py @@ -2148,7 +2148,7 @@ has the same effect as typing a particular string at the help> prompt. elif request in self.symbols: self.showsymbol(request) elif request in ['True', 'False', 'None']: # special case these keywords since they are objects too - doc(eval(request), 'Help on %s:', is_cli=is_cli) + doc(eval(request), 'Help on %s:', output=self._output, is_cli=is_cli) elif request in self.keywords: self.showtopic(request) elif request in self.topics: self.showtopic(request) elif request: doc(request, 'Help on %s:', output=self._output, is_cli=is_cli) @@ -2241,7 +2241,11 @@ module "pydoc_data.topics" could not be found. text = 'Related help topics: ' + ', '.join(xrefs.split()) + '\n' wrapped_text = textwrap.wrap(text, 72) doc += '\n%s\n' % '\n'.join(wrapped_text) - pager(doc) + + if self._output is None: + pager(doc) + else: + self.output.write(doc) def _gettopic(self, topic, more_xrefs=''): """Return unbuffered tuple of (topic, xrefs). |