bpo-37759: Significant edits to Whatsnew 3.8#15127
bpo-37759: Significant edits to Whatsnew 3.8#15127rhettinger merged 13 commits intopython:masterfrom
Conversation
Doc/whatsnew/3.8.rst
Outdated
| if (clean_name := normalize('NFC', name)) in allowed_names] | ||
|
|
||
| Try to limit use of the walrus operator to clean cases that reduce | ||
| complexity and improve readability. When combined with other features |
There was a problem hiding this comment.
I would stop at "readability." I don't think specific examples of what's not okay help the readers of this document.
There was a problem hiding this comment.
Will do.
At some point, we should put in some PEP 8 guidance. I've been using the beta with customers and students for the last several weeks. These examples were typical.
ericvsmith
left a comment
There was a problem hiding this comment.
This looks great to me. Thanks for your work on this, Raymond!
Doc/whatsnew/3.8.rst
Outdated
| inverse for other negative exponents. For example, to compute the | ||
| `modular multiplicative inverse | ||
| <https://en.wikipedia.org/wiki/Modular_multiplicative_inverse>`_ of 38 | ||
| in modulo 137, write:: |
There was a problem hiding this comment.
"in modulo 137" should be "modulo 37".
There was a problem hiding this comment.
Dropped the "in". Kept the 137.
| ``pow(x=2, y=10)`` and ``pow(2, 10, z=17)`` are invalid. | ||
| len(obj='hello') # The "obj" keyword argument impairs readability | ||
|
|
||
| A further benefit of marking a parameter as positional-only is that it |
There was a problem hiding this comment.
I find this section very well structured and informative! This rewrite really makes a difference :) What do you think about adding to this paragraph also the case of going from one argument to *args without breaking client code. For example going from
def add_to_queue(item):
...to
def add_to_queue(*items):
...|
With respect to unittest module. It now has the ability to collect async functions where before 3.8 tests have to be a normal function that could have an async definition inside and uses import asyncio
import unittest
from unittest.async_case import IsolatedAsyncioTestCase
class FooTest(IsolatedAsyncioTestCase):
async def asyncSetUp(self):
print("Async Setup")
async def test_sleep(self):
await asyncio.sleep(1)
self.assertEqual(1, 1)
async def asyncTearDown(self):
print("Async Teardown")
if __name__ == "__main__":
unittest.main()Thanks for improving the changelog examples. |
|
tirkarthi , thanks for the suggestions. I'll add the unittest example to the next round of updates (I'm making multiple PRs to minimize merge conflicts). |
|
Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
(cherry picked from commit 4f9ffc9) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
|
GH-15139 is a backport of this pull request to the 3.8 branch. |
Work in progress. Please add suggestions here as you find them.
https://bugs.python.org/issue37759