Bruno Kolenbrander

Results 76 comments of Bruno Kolenbrander

I'm leaning towards this: - A table at https://pyo3.rs/main/doc/pyo3/attr.pymethods.html summarizing all the dunders like https://cython.readthedocs.io/en/latest/src/userguide/special_methods.html#special-method-table - Examples in the guide, like https://pyo3.rs/main/class.html?#callable-objects We might want to structure that in a...

> convert the &[u8] into Bytes (which does zero copying) Only if the slice has a static lifetime. Otherwise the slice has to be copied regardless.

I don't think we need anything new for this. Converting `Bytes` into `PyBytes` works today (specifically, `Bytes` autodereferences to `&[u8]`): ```rust use pyo3::prelude::*; use pyo3::types::PyBytes; use bytes::Bytes; fn main() {...

That is true, and it would be more convenient. But it has some footgunny behavior - I can totally see someone starting with a `Vec`, converting it to a `Bytes`...

> I believe Bytes::from(vec) just takes ownership of the underlying buffer rather than having to copy the memory (but I could be wrong). It goes through a boxed slice, which...

I'm thinking the best way to do this is to create an object that wraps a `Bytes` and implements the buffer protocol?

I haven't really been keeping up with this sequence stuff, but... > Passing e.g. a `dict` will then get a `Vec` of the keys. Is that helpful? ...sounds like a...

> Any chance you could link me to more info about `#![feature(dyn_star)]`? It was introduced with https://github.com/rust-lang/rust/pull/101212 > however when running with the latest master (https://github.com/rust-lang/rustfmt/commit/ef91154250977b3b5d05448dafbca524a1168b47) this is the output...

I've done a lot of work with leaflet that requires async loading, what in particular would y'all want in an async tutorial? I'm thinking: * extending _createTile(coords,done)_ to load using...

I think having two kinds of `PyObject` (the alias and the ffi thing) is pretty confusing, so I'd like to get rid of the alias.