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
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.
Documentation
The documented signature of
filecmp.cmpfilesnames its first two parametersdir1anddir2:However, the actual parameters are named
aandb(Lib/filecmp.py):As a result the documented keyword names do not work — calling
filecmp.cmpfiles(dir1=..., dir2=..., common=...)raisesTypeError, whilefilecmp.cmpfiles(a=..., b=..., common=...)succeeds.The documentation should be updated to use the real parameter names
aandb.Linked PRs
filecmp.cmpfiles#153900filecmp.cmpfiles(GH-153900) #153910filecmp.cmpfiles(GH-153900) #153911filecmp.cmpfiles(GH-153900) #153912