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
{{ message }}
Repository navigation
Docs: filecmp.cmpfiles parameters documented as dir1/dir2 but named a/b #153899
The documented signature of filecmp.cmpfiles names its first two parameters dir1 and dir2:
.. function:: cmpfiles(dir1, dir2, common, shallow=True)
Compare the files in the two directories *dir1* and *dir2* whose names are
given by *common*.
However, the actual parameters are named a and b (Lib/filecmp.py):
defcmpfiles(a, b, common, shallow=True):
As a result the documented keyword names do not work — calling filecmp.cmpfiles(dir1=..., dir2=..., common=...) raises TypeError, while filecmp.cmpfiles(a=..., b=..., common=...) succeeds.
The documentation should be updated to use the real parameter names a and b.
Activity
Merge branch 'main' into fix-pythongh-153899-filecmp-cmpfiles-params
gh-153899: Fix documented parameter names for `filecmp.cmpfiles` (#15…
[3.13] gh-153899: Fix documented parameter names for `filecmp.cmpfile…
[3.14] gh-153899: Fix documented parameter names for `filecmp.cmpfile…
[3.15] gh-153899: Fix documented parameter names for `filecmp.cmpfile…