Skip to content

Commit 1c80d4a

Browse files
committed
properties doc: clarification vs Python properties
With "data attribute" and insisting that they are backed by Rust methods, it should be enough so that people don't confuse them with Python properties.
1 parent 387e87d commit 1c80d4a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/py_class/py_class.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,10 @@ Declares a static method callable from Python.
171171
172172
`@property_name.setter def set_method_name(&self, value: Option<impl FromPyObject>) -> PyResult<()> { ... }`
173173
174-
Declares a property (attribute with code for getting and optionally setting) accessible from Python.
174+
Declares a Python data attribute backed by Rust methods to
175+
get its value and, optionally, to set or delete it.
176+
177+
### Setter details
175178
176179
* The setter is optional. If omitted, the attribute will be read-only.
177180
* Unlike Python, the setter method name must be different from the property name.

0 commit comments

Comments
 (0)