Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-30206: restore *data* parameter of binascii.b2a_base64 to positional-only #1352

Merged
merged 1 commit into from
May 1, 2017

Conversation

zhangyangyu
Copy link
Member

No description provided.

@mention-bot
Copy link

@zhangyangyu, thanks for your PR! By analyzing the history of the files in this pull request, we identified @serhiy-storchaka, @jackjansen and @benjaminp to be potential reviewers.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

Can you try to write an unit test to prevent regression in the future?

Should we change the doc to specify that data is a positional only argument?

@zhangyangyu
Copy link
Member Author

Of course I could add a test. I don't think we need a doc. It's never mentioned in the current doc and actually I think nobody notice the unintentional change.

@serhiy-storchaka
Copy link
Member

I'm not sure about tests. Other implementation can support passing data as keyword, this isn't a bug. It is hard to implement positional-only parameter in pure Python.

@zhangyangyu
Copy link
Member Author

zhangyangyu commented Apr 30, 2017

Honestly speaking I support adding a test in this case. There are already some tests for positional-only arguments in other tests. I am not sure we should take care of other implementation here or this needs a cpython-only test.

@serhiy-storchaka
Copy link
Member

What are other tests for positional-only arguments?

@zhangyangyu
Copy link
Member Author

zhangyangyu commented Apr 30, 2017

Like test_builtin.TestSorted.test_bad_arguments.

@serhiy-storchaka
Copy link
Member

test_builtin.TestSorted.test_bad_arguments tests a concrete bug caused a crash when pass the first argument by keyword. This is an exceptional case.

@vadmium
Copy link
Member

vadmium commented Apr 30, 2017

The change looks like it does what is intended, although I don’t think it is worthwhile. The damage (if any) as already been done.

@zhangyangyu
Copy link
Member Author

zhangyangyu commented May 1, 2017

Okay. Remove the test. Thanks all :-)

@zhangyangyu zhangyangyu merged commit 1374dbb into python:master May 1, 2017
@zhangyangyu zhangyangyu deleted the bpo-30206 branch May 1, 2017 05:12
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.

6 participants