FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-95065, gh-107704: Argument Clinic: support multiple '/ [from ...]' and '* [from ...]' markers by serhiy-storchaka · Pull Request #108132 · python/cpython · GitHub

/ cpython Public

gh-95065, gh-107704: Argument Clinic: support multiple '/ [from ...]' and '* [from ...]' markers - #108132

Merged
serhiy-storchaka merged 8 commits into
python:mainfrom
serhiy-storchaka:clinic-deprecated-multi
Aug 21, 2023
Merged

gh-95065, gh-107704: Argument Clinic: support multiple '/ [from ...]' and '* [from ...]' markers#108132
serhiy-storchaka merged 8 commits into
python:mainfrom
serhiy-storchaka:clinic-deprecated-multi

Conversation

serhiy-storchaka commented Aug 19, 2023
edited
Loading

Copy link
Copy Markdown
Member

It does not even make the code much more complex. Simply the code which checks that the version is the same is replaced with the code which supports multiple versions.

$ git diff main... --stat Tools/clinic/clinic.py
 Tools/clinic/clinic.py | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------
 1 file changed, 55 insertions(+), 50 deletions(-)

Comment thread Modules/_testclinic.c
Comment thread Tools/clinic/clinic.py Outdated

Copy link
Copy Markdown
Contributor

It does not even make the code much more complex. Simply the code which checks that the version is the same is replaced with the code which supports multiple versions.

Indeed, the refactors from your previous PR came in handy here.

Copy link
Copy Markdown
Contributor

Thanks, this is nice; @AlexWaygood, are you fine with this feature?

AlexWaygood left a comment
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This looks pretty good to me! I'm impressed how little extra code it takes. I have one readability style nit.

I think we should maybe also add one or two examples to https://docs.python.org/3.13/howto/clinic.html#how-to-deprecate-passing-parameters-positionally-or-by-keyword that have mutliple / [from ...] and * [from ...] markers

Comment thread Tools/clinic/clinic.py Outdated
serhiy-storchaka enabled auto-merge (squash) August 21, 2023 13:41
serhiy-storchaka merged commit 60942cc into python:main Aug 21, 2023
serhiy-storchaka deleted the clinic-deprecated-multi branch August 21, 2023 17:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

4 participants


Back | FazBrowse Home | New Git URL