pyo3/guide
Matthew Scheffel e24f29dbf5
Add context manager example to user guide (#1476)
* Add context manager example

A simple illustrative example on how to use context managers. I required this to use pymc3, which relies heavily on the context stack for modelling.

* Clippy changes to context example

* Extend context manager example with exit exceptions

* Context manager, s/call1/call_method1/ and comments for clarity

* Add newline to context manager section to avoid horizontal scrolling

* Change generic, potentially confusing label.

s/objects.py/house.py/

* Use call_function1 rather than call_method1.

* Missed a call_method0, change to call_function0

* Update guide/src/python_from_rust.md

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>

* Update guide/src/python_from_rust.md

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-03-13 22:54:13 +00:00
..
src Add context manager example to user guide (#1476) 2021-03-13 22:54:13 +00:00
book.toml Update `book.toml` to new `mdbook` format [ci skip] 2018-05-17 11:57:09 +02:00