We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contactedHave 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
| Expand Up | @@ -333,12 +333,29 @@ _blake2_blake2s_hexdigest_impl(BLAKE2sObject *self) | |
| return _Py_strhex((const char *)digest, self->param.digest_length); | ||
| } | ||
|
|
||
| /*[clinic input] | ||
| _blake2.blake2s.__reduce__ | ||
|
|
||
| Return the digest value as a string of hexadecimal digits. | ||
| [clinic start generated code]*/ | ||
|
|
||
| static PyObject * | ||
| _blake2_blake2s___reduce___impl(BLAKE2sObject *self) | ||
| /*[clinic end generated code: output=fb085f3da88f0c39 input=49898c2f1ef1ff74]*/ | ||
| { | ||
| PyErr_Format(PyExc_TypeError, | ||
|
Comment thread
Copy link
Copy Markdown
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment@vstinner This function is very redundant with this issue.
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide commentMaybe a public marco :)
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide commentI don't think that exposing it to the public is the proper way.
Sorry, something went wrong.
All reactions
|
||
| "cannot pickle %s object", | ||
| Py_TYPE(self)->tp_name); | ||
| return NULL; | ||
| } | ||
|
|
||
|
|
||
| static PyMethodDef py_blake2s_methods[] = { | ||
| _BLAKE2_BLAKE2S_COPY_METHODDEF | ||
| _BLAKE2_BLAKE2S_DIGEST_METHODDEF | ||
| _BLAKE2_BLAKE2S_HEXDIGEST_METHODDEF | ||
| _BLAKE2_BLAKE2S_UPDATE_METHODDEF | ||
| _BLAKE2_BLAKE2S___REDUCE___METHODDEF | ||
| {NULL, NULL} | ||
| }; | ||
|
|
||
| Expand Down | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide commentRather than having to copy/paste such code in each type, would it be possible to have a protocol like:
This code raises TypeError: unhashable type: 'NotHashable'.
cc @pitrou @serhiy-storchaka
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.