[issue39278] add docstrings to functions in pdb module
New submission from Carl Bordum Hansen : The functions are documented, but not in doc strings which means you cannot call help() on them. >From this twitter thread: >https://twitter.com/raymondh/status/1211414561468952577 -- assignee: docs@python components: Documentation messages: 359689 nosy: carlbordum, docs@python priority: normal severity: normal status: open title: add docstrings to functions in pdb module versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue39278> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39278] add docstrings to functions in pdb module
Change by Carl Bordum Hansen : -- keywords: +patch pull_requests: +17331 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17924 ___ Python tracker <https://bugs.python.org/issue39278> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29893] create_subprocess_exec doc doesn't match software
Carl Bordum Hansen added the comment: This was fixed in https://github.com/python/cpython/pull/12598 -- nosy: +carlbordum ___ Python tracker <https://bugs.python.org/issue29893> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29127] Incorrect reference names in asyncio.subprocess documentation
Carl Bordum Hansen added the comment: I do not think this is the case any longer -- nosy: +carlbordum ___ Python tracker <https://bugs.python.org/issue29127> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30578] Misleading example in sys.set_coroutine_wrapper docs
Carl Bordum Hansen added the comment: I think this can be closed as `sys.set_coroutine_wrapper` was removed in https://bugs.python.org/issue36933 -- nosy: +carlbordum ___ Python tracker <https://bugs.python.org/issue30578> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29394] Cannot tunnel TLS connection through TLS connection
Change by Carl Bordum Hansen : -- keywords: +patch nosy: +carlbordum nosy_count: 4.0 -> 5.0 pull_requests: +21542 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22539 ___ Python tracker <https://bugs.python.org/issue29394> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25292] ssl socket gets into broken state when client exits during handshake
Change by Carl Bordum Hansen : -- keywords: +patch nosy: +carlbordum nosy_count: 5.0 -> 6.0 pull_requests: +21544 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22541 ___ Python tracker <https://bugs.python.org/issue25292> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25292] ssl socket gets into broken state when client exits during handshake
Carl Bordum Hansen added the comment: I have submitted a proposed solution Just found this similar issue https://bugs.python.org/issue35840 -- ___ Python tracker <https://bugs.python.org/issue25292> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37376] pprint for types.SimpleNamespace
New submission from Carl Bordum Hansen : Currently, pprint.pprint does not help you at all when pretty-printing SimpleNamespaces. I have implemented support for this. -- components: Library (Lib) messages: 346318 nosy: carlbordum, fdrake, serhiy.storchaka priority: normal severity: normal status: open title: pprint for types.SimpleNamespace type: enhancement versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue37376> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37376] pprint for types.SimpleNamespace
Change by Carl Bordum Hansen : -- keywords: +patch pull_requests: +14142 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14318 ___ Python tracker <https://bugs.python.org/issue37376> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30588] Missing documentation for codecs.escape_decode
Change by Carl Bordum Hansen : -- keywords: +patch pull_requests: +14542 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14747 ___ Python tracker <https://bugs.python.org/issue30588> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16520] subprocess.Popen() TypeError message incorrect without args argument
Carl Bordum Hansen added the comment: I think changing the message will break a lot of tests. Here are some examples just from CPython: https://github.com/python/cpython/blob/master/Lib/test/test_dataclasses.py#L2655 https://github.com/python/cpython/blob/master/Lib/test/test_extcall.py It would also outdate some documentation examples. -- nosy: +carlbordum ___ Python tracker <https://bugs.python.org/issue16520> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36261] email examples should not gratuitously mess with preamble
Carl Bordum Hansen added the comment: I also only found the one case. Submitted a patch. -- nosy: +carlbordum ___ Python tracker <https://bugs.python.org/issue36261> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36261] email examples should not gratuitously mess with preamble
Change by Carl Bordum Hansen : -- keywords: +patch pull_requests: +14546 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14751 ___ Python tracker <https://bugs.python.org/issue36261> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37592] sysconfig should not rely on sys.version
New submission from Carl Bordum Hansen : I found this FIXME and replaced it with code that follows the git tags naming scheme. -- components: Library (Lib) messages: 347916 nosy: carlbordum, tarek priority: normal severity: normal status: open title: sysconfig should not rely on sys.version type: enhancement versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue37592> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37592] sysconfig should not rely on sys.version
Change by Carl Bordum Hansen : -- keywords: +patch pull_requests: +14570 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14776 ___ Python tracker <https://bugs.python.org/issue37592> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30588] Missing documentation for codecs.escape_decode
Carl Bordum Hansen added the comment: You have a point, the function is not in codecs.__all__. Reading the stackoverflow questions, it seems like this is a function that is useful. -- nosy: +carlbordum ___ Python tracker <https://bugs.python.org/issue30588> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35666] Update design FAQ about assignment expression
New submission from Carl Bordum Hansen : Hi there, In ``Doc/faq/design.rst`` there is an explanation of why Python does not have assignment in expressions. This is dated since PEP 572 / Python 3.8. Online version: https://docs.python.org/3/faq/design.html#why-can-t-i-use-an-assignment-in-an-expression I suggest updating it to the attached file. `git diff`: ``` diff --git a/Doc/faq/design.rst b/Doc/faq/design.rst index e2d63a0323..e61284611d 100644 --- a/Doc/faq/design.rst +++ b/Doc/faq/design.rst @@ -149,7 +149,15 @@ to tell Python which namespace to use. Why can't I use an assignment in an expression? --- -Many people used to C or Perl complain that they want to use this C idiom: +In Python 3.8 and newer, you can use assignment in an expression with the +``:=`` operator (as described in :pep:`572`):: + +while line := f.readline(): +... # do something with line + +For more than 25 years it was not possible to do assignments in expressions in +Python. Naturally, many people used to C or Perl would complain that they want +to use this C idiom: .. code-block:: c @@ -157,7 +165,7 @@ Many people used to C or Perl complain that they want to use this C idiom: // do something with line } -where in Python you're forced to write this:: +where in Python you would be forced to write this:: while True: line = f.readline() @@ -165,8 +173,10 @@ where in Python you're forced to write this:: break ... # do something with line -The reason for not allowing assignment in Python expressions is a common, -hard-to-find bug in those other languages, caused by this construct: +The reason different operators are used for assignment and assignment in +expressions (``=`` and ``:=``, respectively), and why Python didn't allow +assignment in expressions for a long time is a common, hard-to-find bug in +those other languages, caused by this construct: .. code-block:: c @@ -180,11 +190,6 @@ hard-to-find bug in those other languages, caused by this construct: The error is a simple typo: ``x = 0``, which assigns 0 to the variable ``x``, was written while the comparison ``x == 0`` is certainly what was intended. -Many alternatives have been proposed. Most are hacks that save some typing but -use arbitrary or cryptic syntax or keywords, and fail the simple criterion for -language change proposals: it should intuitively suggest the proper meaning to a -human reader who has not yet been introduced to the construct. - An interesting phenomenon is that most experienced Python programmers recognize the ``while True`` idiom and don't seem to be missing the assignment in expression construct much; it's only newcomers who express a strong desire to ``` -- assignee: docs@python components: Documentation files: design.rst messages: 333063 nosy: carlbordum, docs@python priority: normal severity: normal status: open title: Update design FAQ about assignment expression type: enhancement versions: Python 3.8 Added file: https://bugs.python.org/file48025/design.rst ___ Python tracker <https://bugs.python.org/issue35666> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23984] Documentation error: Descriptors
Change by Carl Bordum Hansen : -- keywords: +patch pull_requests: +12356 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue23984> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23984] Documentation error: Descriptors
Carl Bordum Hansen added the comment: I submitted a PR that addresses this and the next example, which also uses print unnecessarily. To answer your last comment rhettinger; the preceding text tells you /why/ one might want to use a staticmethod: """ Good candidates for static methods are methods that do not reference the ``self`` variable. For instance, a statistics package may include a container class for experimental data. The class provides normal methods for computing the average, mean, median, and other descriptive statistics that depend on the data. However, there may be useful functions which are conceptually related but do not depend on the data. For instance, ``erf(x)`` is handy conversion routine that comes up in statistical work but does not directly depend on a particular dataset. It can be called either from an object or the class: ``s.erf(1.5) --> .9332`` or ``Sample.erf(1.5) --> .9332``. Since staticmethods return the underlying function with no changes, the example calls are unexciting:: """ -- nosy: +carlbordum versions: +Python 3.6, Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue23984> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25988] collections.abc.Indexable
Carl Bordum Hansen added the comment: Thank you for all the hours all of you spent on making Python awesome. I would like to start contributing as well. Do you consider it time to remove `__getattr__` in `Lib/collections/__init__.py` on master yet (introduced in pr #5460)? -- nosy: +carlbordum ___ Python tracker <https://bugs.python.org/issue25988> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com