[Python-checkins] bpo-33745: Add What's New for empty function docstring change. (GH-7611)

Miss Islington (bot) webhook-mailer at python.org
Sun Jun 10 23:00:20 EDT 2018


https://github.com/python/cpython/commit/14a190c88273fb22d9439bbed394f19f21e8a0f9
commit: 14a190c88273fb22d9439bbed394f19f21e8a0f9
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-06-10T20:00:17-07:00
summary:

bpo-33745: Add What's New for empty function docstring change. (GH-7611)

(cherry picked from commit 12c6cdf4d16078aa09de32a39193c8161177b39d)

Co-authored-by: Ned Deily <nad at python.org>

files:
M Doc/whatsnew/3.7.rst

diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst
index 81ef032f9377..297d9fa312ce 100644
--- a/Doc/whatsnew/3.7.rst
+++ b/Doc/whatsnew/3.7.rst
@@ -2431,3 +2431,8 @@ sufficient to both emit :exc:`BytesWarning` messages and have them converted
 to exceptions.  Instead, the flag must be set (to cause the warnings to be
 emitted in the first place), and an explicit ``error::BytesWarning``
 warnings filter added to convert them to exceptions.
+
+Due to a change in the way docstrings are handled by the compiler, the
+implicit ``return None`` in a function body consisting solely of a docstring
+is now marked as occurring on the same line as the docstring, not on the
+function's header line.



More information about the Python-checkins mailing list