GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||
GeezerVison is showing github.com — gh-125897: Use positional-only parameter indicators for ``range()`` by kbaikov · Pull Request #125945 · python/cpython Conversation
|
|
@kbaikov, please avoid force-pushes: https://devguide.python.org/getting-started/pull-request-lifecycle |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
A friendly ping. Is there any decision on this issue/PR? How do i proceed? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
CC @nedbat Perhaps, https://devguide.python.org/documentation/style-guide/#function-signatures requires a clarification. Is this for new code? How we should handle current sphinx docs, that use funny square bracket syntax? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| .. class:: range(stop) | ||
| range(start, stop, step=1) | ||
| .. class:: range(stop, /) | ||
| range(start, stop, step=1, /) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think enumerating all three cases is slightly nicer. The step argument is for advanced use-cases. Thoguhts @terryjreedy?
| range(start, stop, step=1, /) | |
| range(start, stop, /) | |
| range(start, stop, step, /) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I generally prefer fewer lines, partly from experience with IDLE call tips (which would be similar in other IDEs). Serhiy generally went with fewer in his PR, as he did here, except where really needed. Two are really needed here, since the true Python-implementaton signature (start_or_stop, stop_if_needed=None, step=1, /) is definitely too baroque for the doc.
Given your approval, I will merge this and backport (as Serhiy plans to backport his changes).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
range()
range()range()
|
Thanks @kbaikov for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ythonGH-125945) (cherry picked from commit 0c83daa) Co-authored-by: Konstantin Baikov <[email protected]>
…ythonGH-125945) (cherry picked from commit 0c83daa) Co-authored-by: Konstantin Baikov <[email protected]>
|
GH-137652 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-137653 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…H-125945) (#137653) Co-authored-by: Konstantin Baikov <[email protected]>
* main: pythongh-137288: Update 3.14 magic numbers (pythonGH-137665) pythongh-135228: When @DataClass(slots=True) replaces a dataclass, make the original class collectible (take 2) (pythonGH-137047) pythongh-126008: Improve docstrings for Tkinter cget and configure methods (pythonGH-133303) pythongh-131885: Use positional-only markers for ``max()`` and ``min()`` (python#131868) pythonGH-137426: Remove code deprecation of `importlib.abc.ResourceLoader` (pythonGH-137567) pythongh-125897: Mark range function parameters as positional only (python#125945) pythongh-137400: Fix a crash when disabling profiling across all threads (pythongh-137471) pythongh-115766: Fix IPv4Interface.is_unspecified (pythonGH-137326) pythongh-128813: cleanup C-API docs for PyComplexObject (pythonGH-137579) pythongh-135953: Profile a module or script with sampling profiler (python#136777) Fix documentation of hash in PyHash_FuncDef (python#137595)
…H-125945) (#137652) Co-authored-by: Konstantin Baikov <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.