Adds a member to the module. This is a convenience function which can be used from the module's initialization function.
(&self, py: Python, name: &str, value: V)
| 140 | /// |
| 141 | /// This is a convenience function which can be used from the module's initialization function. |
| 142 | pub fn add<V>(&self, py: Python, name: &str, value: V) -> PyResult<()> |
| 143 | where |
| 144 | V: ToPyObject, |
| 145 | { |
| 146 | self.as_object().setattr(py, name, value) |
| 147 | } |
| 148 | |
| 149 | /// Adds a new extension type to the module. |
| 150 | /// |