From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Radon Rosborough Newsgroups: gmane.emacs.bugs Subject: bug#29003: 25.3; Docstring from PEP 257 is filled incorrectly by Emacs Date: Wed, 25 Oct 2017 19:08:47 -0700 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1508983820 31127 195.159.176.226 (26 Oct 2017 02:10:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 26 Oct 2017 02:10:20 +0000 (UTC) To: 29003@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 26 04:10:12 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7XcR-0006Fg-Cg for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Oct 2017 04:10:03 +0200 Original-Received: from localhost ([::1]:50608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7XcX-0001Yt-Ld for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Oct 2017 22:10:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7XcR-0001Yn-Lk for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 22:10:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7XcQ-0006Uy-Bd for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 22:10:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53322) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e7XcQ-0006Ul-7i for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 22:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e7XcP-0003rO-V2 for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 22:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Radon Rosborough Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Oct 2017 02:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 29003 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.150898377914802 (code B ref -1); Thu, 26 Oct 2017 02:10:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Oct 2017 02:09:39 +0000 Original-Received: from localhost ([127.0.0.1]:33770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7Xc3-0003qf-5C for submit@debbugs.gnu.org; Wed, 25 Oct 2017 22:09:39 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7Xc1-0003qQ-7v for submit@debbugs.gnu.org; Wed, 25 Oct 2017 22:09:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7Xbv-0006Bh-9I for submit@debbugs.gnu.org; Wed, 25 Oct 2017 22:09:31 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:58482) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e7Xbv-0006Bc-5m for submit@debbugs.gnu.org; Wed, 25 Oct 2017 22:09:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7Xbu-0001Y3-9X for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 22:09:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7Xbt-0006Au-Go for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 22:09:30 -0400 Original-Received: from mail-lf0-x22b.google.com ([2a00:1450:4010:c07::22b]:45002) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e7Xbt-0006Ae-8Z for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2017 22:09:29 -0400 Original-Received: by mail-lf0-x22b.google.com with SMTP id 75so2031820lfx.1 for ; Wed, 25 Oct 2017 19:09:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=a4ds1HGfnm2QNTJGn71O6Ohv7+EUQFzxjooq1qBJeUQ=; b=TXDz8qltRhnLHuGUwcBAeZKSmF38jOhaCdvfHpiwQOohtg5CKGWpo/PKEvBmtKW8Pn cU3q3PsJMBGNeD+5w0fKUAI4PLBKxtVNeNgG2yUa32/n1AKTfkaW0wzKpt/L8klJTEO8 NPiMryKkYhjtMEvjV1WmUDo4kqYan2GIsx/k3mGyLVfZXW3ontjipru2e5Jvf++6NQob 7sXpP99t6U+/XwQZIxl1zn3wua/shwOet3rofWT9OzTeg5PvTaDxmQoNVJa+b+y6W8EB iVdFshT6a/MuOGLEh5Zho4daUYpxn9ehwGsTcrgGgSi/yVdje7x3odyxCShWK3I/xyRr FmvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=a4ds1HGfnm2QNTJGn71O6Ohv7+EUQFzxjooq1qBJeUQ=; b=fAaVjcIARYXPi4vWUbpFUxkQf3ox2ORrnVsJ/CJpwxLaxRB9bWWbdCK/ppmA8FeTnj EJNKd3v1Kv+d94dS51mlcSZcPlIWupUWaU5YPHhxhzX6onRNFkesTWcJlxvL6X5/kKyF IYwap5OsAr/KhDs1ykrd5Ulx+JjrpYAXdHdIOcXELd5zfuXk+lfFfTC7k7NebE4dPE9j HSrxCGpoMPLATcuGHBEKxsS4OHzGkQOBMMC4Mktw6v/8LJImWGES+KpUdJ54IglUgylm U/VVuCcMdWrjwdnZuK59DdYxuIPv+6eemrwQ4XW0YUe/aqU9imG4qsDfPfOnd3xsm3Pa Dw6A== X-Gm-Message-State: AMCzsaUk2olmp5M1x7uTvMkRSw6IJHI2CnNqQq8UMwmyyEzHpkexgeYm 0/TIQEY3PFPHH7WYy9is5litgi0Dsn3+ZFl2ySnabQ== X-Google-Smtp-Source: ABhQp+QHwWD0OPS52Z+3ByrYal7Zgiao34LELkWG7hmw5DUILpFRT6PZ8fIqHElQ838R+MhoGO7G3oneLYnusElT6Rk= X-Received: by 10.46.25.132 with SMTP id 4mr8864111ljz.145.1508983767658; Wed, 25 Oct 2017 19:09:27 -0700 (PDT) Original-Received: by 10.25.208.10 with HTTP; Wed, 25 Oct 2017 19:08:47 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:138988 Archived-At: I recently noticed that Emacs fills an example docstring given [1] in PEP 257 incorrectly. With `python-fill-docstring-style' at its default value of `pep-257', the following code sample: def complex(real=0.0, imag=0.0): """Form a complex number. Keyword arguments: real -- the real part (default 0.0) imag -- the imaginary part (default 0.0) """ if imag == 0.0 and real == 0.0: return complex_zero ... is filled to: def complex(real=0.0, imag=0.0): """Form a complex number. Keyword arguments: real -- the real part (default 0.0) imag -- the imaginary part (default 0.0) """ if imag == 0.0 and real == 0.0: return complex_zero ... There are two issues here: the extra newline added, and the unwrapping of the keyword arguments. The extra newline can be suppressed by changing the value of `python-fill-docstring-style', but the keyword argument unwrapping does not appear to be suppressible. This seems erroneous to me since the value of `python-fill-docstring' would suggest PEP 257 compliance, i.e. the examples given in PEP 257 should not be a affected by wrapping. (I also checked out the third-party package `python-docstring' [2], and it has the same behavior.)