Skip to content

Conversation

xyb
Copy link
Contributor

@xyb xyb commented Aug 9, 2024

No description provided.

@devdanzin
Copy link
Member

Nice! Please consider fixing (some?) of the following typos too:

diff --git a/Lib/_pylong.py b/Lib/_pylong.py
index a8bf5cd3e63..66ee03c7888 100644
--- a/Lib/_pylong.py
+++ b/Lib/_pylong.py
@@ -613,7 +613,7 @@ def int_divmod(a, b):
 #     ctx.prec = max(n.adjusted() - p256.adjusted(), 0) + GUARD
 #     hi = +n * +recip # unary `+` chops to ctx.prec digits
 #
-# we have 3 visible chopped operationa, but there's also a 4th:
+# we have 3 visible chopped operations, but there's also a 4th:
 # precomputing a truncated `recip` as part of setup.
 #
 # So the computed product is exactly equal to the true product times
@@ -703,7 +703,7 @@ def int_divmod(a, b):
 # Enable for brute-force testing of compute_powers(). This takes about a
 # minute, because it tries millions of cases.
 if 0:
-    def consumer(w, limir, need_hi):
+    def consumer(w, limit, need_hi):
         seen = set()
         need = set()
         def inner(w):
@@ -718,7 +718,7 @@ def inner(w):
             inner(lo)
             inner(hi)
         inner(w)
-        exp = compute_powers(w, 1, limir, need_hi=need_hi)
+        exp = compute_powers(w, 1, limit, need_hi=need_hi)
         assert exp.keys() == need

     from itertools import chain
diff --git a/Lib/dataclasses.py b/Lib/dataclasses.py
index 4cba606dd8d..141aa41c74d 100644
--- a/Lib/dataclasses.py
+++ b/Lib/dataclasses.py
@@ -656,7 +656,7 @@ def _init_fn(fields, std_fields, kw_only_fields, frozen, has_post_init,
     if kw_only_fields:
         # Add the keyword-only args.  Because the * can only be added if
         # there's at least one keyword-only arg, there needs to be a test here
-        # (instead of just concatenting the lists together).
+        # (instead of just concatenating the lists together).
         _init_params += ['*']
         _init_params += [_init_param(f) for f in kw_only_fields]
     func_builder.add_fn('__init__',

@xyb xyb requested a review from ericvsmith as a code owner August 9, 2024 13:09
@xyb
Copy link
Contributor Author

xyb commented Aug 9, 2024

@devdanzin I've fixed the typos that you pointed, please review it again. Thank you.

@hauntsaninja hauntsaninja merged commit 253c6a0 into python:main Aug 12, 2024
44 checks passed
@xyb xyb deleted the fixtypos branch August 12, 2024 06:08
blhsing pushed a commit to blhsing/cpython that referenced this pull request Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants