Missing __init_subclass__
and __set_name__
magic methods in the user guide
#4180
Labels
__init_subclass__
and __set_name__
magic methods in the user guide
#4180
Bug Description
__set_name__
magic method is missing from https://pyo3.rs/v0.21.2/class/protocols#descriptors__init_subclass__
magic method is also missing from https://pyo3.rs/v0.21.2/class/protocols (Not quite sure which section__init_subclass__
should go into)(Details for both methods: https://peps.python.org/pep-0487/#proposal)
Both magic methods seem to work in PyO3, so it looks like it's just the documentation for them that is missing from the user guide. Here's the code that I got to work for reference:
__set_name__
:__init_subclass__
:Your operating system and version
Windows 10 Home 22H2 Build 19045.4291
Your Python version (
python --version
)3.10.11
Your Rust version (
rustc --version
)1.71.1
Your PyO3 version
0.21.2
How did you install python? Did you use a virtualenv?
python -m venv venv
The text was updated successfully, but these errors were encountered: