Skip to content

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Mar 26, 2019

Lib/functools.py Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly confused over why allow duplicate comment is added here since dict merge removes duplicates though self.keywords and keyword might have same keys.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to mention the reason the reason of why we cannot just call self.func(*self.args, *args, **self.keywords, **keywords). The latter syntax does not allow an argument name be duplicated in self.keywords and keywords.

I'll clarify the comments.

@serhiy-storchaka
Copy link
Member Author

I have just removed unclear comments. The behavior is explained in the module documentation and covered by tests, so there is small chance to break it.

Interesting that the reference implementation in the documentation already uses dict unpacking.

Copy link
Member

@terryjreedy terryjreedy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like all the changes, especially the last one in functools.
Please don't close the issue until the idlelib change is backported one way or another.

@ericvsmith
Copy link
Member

All of these changes look correct to me.

@serhiy-storchaka serhiy-storchaka merged commit da08470 into python:master Mar 27, 2019
@serhiy-storchaka serhiy-storchaka deleted the dict-merge branch March 27, 2019 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants