Skip to content

Docs: filecmp.cmpfiles parameters documented as dir1/dir2 but named a/b #153899

Description

@fedonman

Documentation

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):

def cmpfiles(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.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions