-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
bpo-37759: Significant edits to Whatsnew 3.8 #15127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"in modulo 137" should be "modulo 37".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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