PyO3/pyo3

RFC: Make pyclass immutable by default

Aperta

#4369 aperta il 21 lug 2024

 (6 commenti) (0 reazioni) (0 assegnatari)Rust (668 fork)batch import
Good First Issuerefactoring

Metriche repository

Star
 (10.152 stelle)
Metriche merge PR
 (Merge medio 9g 18h) (51 PR mergiate in 30 g)

Descrizione

In https://github.com/PyO3/pyo3/pull/1979#pullrequestreview-803253395 we discussed that we'd like to have #[pyclass(mutable)], making pyclasses immutable by default and mutability opt-in.

Currently we have #[pyclass(frozen)] where this is the other way around; they are mutable by default.

Guida contributor