-
Notifications
You must be signed in to change notification settings - Fork 763
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
implement PyBytesMethods
and PyByteArrayMethods
#3651
Conversation
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.
LGTM except for the stray TODO
comment
Thanks again for all the reviews this week, I'm really excited to have some momentum on the new API! |
@davidhewitt Won't this fail due to the Clippy warning for the self convention on |
Oh yikes, probably, yes. I've cancelled the merge and will fixup. Good catch! |
Implements
PyBytesMethods
andPyByteArrayMethods
traits as per #3382The main interesting thing here is that to be able to forward the
.as_bytes()
and.as_bytes_mut()
methods from the gil refs to the underlying types, I had to extend the lifetime of the returned slices. Unclear to me if there's a way to change things to not need this.