Skip to content

Better error message for incompatible default argument (take 2)#3783

Merged
gvanrossum merged 2 commits into
python:masterfrom
elazarg:error-default-arg
Jul 31, 2017
Merged

Better error message for incompatible default argument (take 2)#3783
gvanrossum merged 2 commits into
python:masterfrom
elazarg:error-default-arg

Conversation

@elazarg

@elazarg elazarg commented Jul 31, 2017

Copy link
Copy Markdown
Contributor

Reopen #3773

Add tests for tuple parameter
@elazarg

elazarg commented Jul 31, 2017

Copy link
Copy Markdown
Contributor Author

@gvanrossum

@gvanrossum gvanrossum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please just fix the nit (remove no'), don't do anything else.

Comment thread mypy/checker.py Outdated
name = arg.variable.name()
msg = 'Incompatible default for '
if name.startswith('__tuple_arg_'):
msg += "tuple argument no' {}".format(name[12:])

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Few people will understand argument no' 1 -- just get rid of the no' and make it argument 1 please.

@gvanrossum
gvanrossum merged commit 6366a02 into python:master Jul 31, 2017
@gvanrossum

Copy link
Copy Markdown
Member

Thanks! Next time it would be nice to have an issue before you start coding. :-)

@elazarg

elazarg commented Jul 31, 2017

Copy link
Copy Markdown
Contributor Author

Will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants