You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a number (>10) of modules with functions that don't have the position-only marker (see #91950, #94735), for example here is a (partial) list that contains a number of functions that should likely have position-only markers but are missing from the documentation (can also be verified via inspect.signature).
As there's quite a number of modules involved I'm wondering how best to structure PRs so it'd be easy to review, and have something like this in mind:
Provide some command to get all modified functions (git diff ...)
Copy-pastable list of functions with keyword arguments that can be run (all functions should raise TypeError) to confirm that the functions are indeed keyword-only, i.e.
import math
math.ceil(x=None)
math.comb(n=None, k=None)
math.copysign(x=None, y=None)
math.fabs(x=None)
results in
>>> math.ceil(x=None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: math.ceil() takes no keyword arguments
>>> math.comb(n=None, k=None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: math.comb() takes no keyword arguments
>>> math.copysign(x=None, y=None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: math.copysign() takes no keyword arguments
>>> math.fabs(x=None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: math.fabs() takes no keyword arguments
confirming the fact that these functions are missing the position-only marker.
Some diff command that can compare the two lists to confirm they're equivalent
Any more suggestions to make it easier to review / show correctness?
Uh oh!
There was an error while loading. Please reload this page.
There are a number (>10) of modules with functions that don't have the position-only marker (see #91950, #94735), for example here is a (partial) list that contains a number of functions that should likely have position-only markers but are missing from the documentation (can also be verified via inspect.signature).
The text was updated successfully, but these errors were encountered: