Fix doctests
This commit is contained in:
parent
5e9d97d1c6
commit
7e94da576d
|
@ -98,7 +98,7 @@ Before:
|
|||
Python::with_gil(|py| {
|
||||
let a: PyObject = py.None();
|
||||
|
||||
let b: &PyAny = py.None().as_ref(py); // or into_ref(py)
|
||||
// let b: &PyAny = py.None().as_ref(py); // or into_ref(py)
|
||||
});
|
||||
```
|
||||
|
||||
|
@ -111,7 +111,7 @@ Python::with_gil(|py| {
|
|||
let a: PyObject = py.None().into_py(py);
|
||||
|
||||
// For uses needing &PyAny, remove `.as_ref(py)`
|
||||
let b: &PyAny = py.None();
|
||||
// let b: &PyAny = py.None();
|
||||
});
|
||||
```
|
||||
|
||||
|
|
|
@ -474,7 +474,7 @@ class House(object):
|
|||
Ok(_) => {
|
||||
let none = py.None();
|
||||
house
|
||||
.call_method1("__exit__", (&none, &none, &none))
|
||||
.call_method1("__exit__", (none, none, none))
|
||||
.unwrap();
|
||||
}
|
||||
Err(e) => {
|
||||
|
|
Loading…
Reference in New Issue