Skip to content

Missing argument in lambda function #7

@BobBaeck

Description

@BobBaeck

Tutorial script recentfiles.py is missing argument in lambda function in line 21.

for f in recent_files:
    menu_recent.add_command(label=os.path.basename(f), command=lambda : openFile(f))

The book has the correct version

for f in recent_files:
    menu_recent.add_command(label=os.path.basename(f), command=lambda f=f : openFile(f))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions