From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Radon Rosborough Newsgroups: gmane.emacs.devel Subject: Docstring from PEP 257 is filled incorrectly by Emacs Date: Wed, 25 Oct 2017 18:33:44 -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 1508981724 20014 195.159.176.226 (26 Oct 2017 01:35:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 26 Oct 2017 01:35:24 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 26 03:35:19 2017 Return-path: Envelope-to: ged-emacs-devel@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 1e7X4f-0003El-NC for ged-emacs-devel@m.gmane.org; Thu, 26 Oct 2017 03:35:09 +0200 Original-Received: from localhost ([::1]:50534 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7X4l-0003Sx-Cw for ged-emacs-devel@m.gmane.org; Wed, 25 Oct 2017 21:35:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7X40-0003Sn-61 for emacs-devel@gnu.org; Wed, 25 Oct 2017 21:34:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7X3z-0006ke-5e for emacs-devel@gnu.org; Wed, 25 Oct 2017 21:34:28 -0400 Original-Received: from mail-lf0-x229.google.com ([2a00:1450:4010:c07::229]:49645) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e7X3y-0006hy-T9 for emacs-devel@gnu.org; Wed, 25 Oct 2017 21:34:27 -0400 Original-Received: by mail-lf0-x229.google.com with SMTP id w21so1960893lfc.6 for ; Wed, 25 Oct 2017 18:34:26 -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=itsmUB7uWOrWJ4eq5QA39UFKe8NxqmFoswUTEFmMM7A=; b=tjel2C8tfebdd0mRmIDeIs4luWcr8ygTV8lU/sfpbD6yTt4KiNySj/VLbx5xaeh4R2 ZajoypuANQO437UJgz91iWqLZlaWjSeFPD4MV+uFuCZSjZKLKTc5BVo+/LpV+C4eijWy +cR9oBl3Q6+YIFsM1FPGvybNxht9mKLvuljIP90+pdyQOlqmuv7rerDms6XMDvQe4J0I rBnKvy68ALcBmM64UBNm7GsG/AUhQ6FyHFTfOcyaa4ipQXlQhnCiWrXfsUx0ErvAG+CU iZoRc6Y1W/N0vhnupcUUKzozrC6tn3Y4X1XkdIqXmHa/4IpQIAdglpUoH+n/z6ayl/bU xGHA== 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=itsmUB7uWOrWJ4eq5QA39UFKe8NxqmFoswUTEFmMM7A=; b=erSzNF+VVrTSzRBxXms7gYXfOUlqGW+ox2FsCIwEzh+pThQdlMynm1XM2r4UTolLIF 7eDM4s530tDWm/AJiz8izf7ddHG6t50jQw6fyn/B6J7rqh/t36qJzOB8TSlLqa9Xn5w0 bvbMhEs7VzFh3npd2wSgOPEMYbsjLEPNzt3WqPbs5PWzs6qPCh9scDHELQXX2D6Pqc2o lV6ObUVLruX8wdxLWY1VCCXR2V446Q+SsZ+lgVVSMxEgAuCjO1cIsHqWacBpKykZytCn Goujk9XqsVXF8MSG6/KYpYw4vP6IC9VA/SzZlG7C5xRXdsFsmZGUG0oEMnIGLsbYUq9G 1vlA== X-Gm-Message-State: AMCzsaV/5fzi1q0wbBdJpB4UKjxhM/oL+faiy5IwMZA4b2RwA0T/T3U1 LA8Q/4lQfkrwqE95bK0HQM5QhX7q/KMgHclBywoBHA== X-Google-Smtp-Source: ABhQp+ScN4fNrxe+VfEG5y4Ka9ZufIFxUamfWB32L3BkxSiAdrNw3q7VGd09mEOmMwZEEnSlFGYN4xXrl/KWVyjdCGk= X-Received: by 10.46.15.1 with SMTP id 1mr7715540ljp.157.1508981665091; Wed, 25 Oct 2017 18:34:25 -0700 (PDT) Original-Received: by 10.25.208.10 with HTTP; Wed, 25 Oct 2017 18:33:44 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::229 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:219772 Archived-At: Hi all, I recently noticed that Emacs fills an example docstring given [1] in PEP 257 incorrectly. With `python-fill-docstring' 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 ... This seems erroneous to me since the value of `python-fill-docstring' would suggest PEP 257 compliance. I also checked out the third-party package `python-docstring' [2], and it has the same behavior. Do we want to change the behavior of `python-docstring-fill', improve the documentation to note this potentially confusing case, or leave it as is? Best, Radon [1]: https://www.python.org/dev/peps/pep-0257/#multi-line-docstrings [2]: https://github.com/glyph/python-docstring-mode