| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…t default after pos-only with default
|
test_nntplib failure seems unrelated, but I cannot re-trigger Azure build. |
Sorry, something went wrong.
|
@hauntsaninja if you are interested in this as well after #103554 I would be very grateful :) |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for finding and fixing this!
I think the fix can be even simpler, though; see inline comment.
Sorry, something went wrong.
| if (top_kind != _POSITIONAL_ONLY | ||
| and kind != _POSITIONAL_OR_KEYWORD): | ||
| # We still have to maintain defaults in cases like | ||
| # def some(pod=42, /, pk=1): ... | ||
| # Here `pk` must have a default value. | ||
| kind_defaults = False |
There was a problem hiding this comment.
non-default-after-default is only checked for _POSITIONAL_ONLY and _POSITIONAL_KEYWORD (see line 3032.) So if we want to keep the value of kind_defaults across the transition from PO to POK (which I do agree is correct and matches the parser behavior), then really we always want to keep it, and it is no longer kind_defaults but simply seen_default. So I think we can eliminate all of this, here's the full version I'd recommend (which passes all tests): https://gist.github.com/carljm/6779e601d04e0b1135444b4e0263e281
Sorry, something went wrong.
There was a problem hiding this comment.
Yes, I agree, thank you for the suggestion.
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request. |
Sorry, something went wrong.
|
I have made the requested changes; please review again |
Sorry, something went wrong.
|
Thanks for making the requested changes! @carljm: please review the changes made to this pull request. |
Sorry, something went wrong.
…to issue-103556
…t default after pos-only with default (pythonGH-103557) (cherry picked from commit 6b58d41) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
GH-103675 is a backport of this pull request to the 3.11 branch. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
I consider this a bug fix, not a new feature. So, backport to 3.11 should probably be done.