PyO3 / pyo3

Rust bindings for the Python interpreter
https://pyo3.rs
Other
11.44k stars 693 forks source link

Implement PartialEq for PyBytes and [u8] #4259

Closed codeguru42 closed 1 week ago

codeguru42 commented 2 weeks ago

This is my attempt to implement PartialEq for PyBytes and [u8]. See #4250.

codeguru42 commented 2 weeks ago

From what I can tell you have to specify the length of the array like [u8; 12]. Is there a way to make the length generic or should I use Vec<u8> instead?

codeguru42 commented 2 weeks ago

This is working for PartialEq for PyBytes and [u8]. Do we want to merge this as-is or should I also add impls for [u8; N] as suggested above by icxolu?

codeguru42 commented 1 week ago

I think I fixed one of the examples in the doc comment. I'm not sure how to fix the second one, though.

alex commented 1 week ago

Changelog is wrong, so let's remember to fix when we do the release!