PyO3/pyo3

RFC: Make pyclass immutable by default

Open

#4369 aperta il 21 lug 2024

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

Metriche repository

Star
 (10.152 star)
Metriche merge PR
 (Merge medio 12g 19h) (64 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