2020-08-09 21:47:54 +00:00
|
|
|
use pyo3::{types::PyDict, Py, PyNativeType, Python};
|
2020-04-20 17:44:31 +00:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let gil = Python::acquire_gil();
|
|
|
|
let dict: Py<PyDict> = PyDict::new(gil.python()).into();
|
|
|
|
let dict: &PyDict = dict.as_ref(gil.python());
|
|
|
|
drop(gil);
|
|
|
|
|
|
|
|
let _py: Python = dict.py(); // Obtain a Python<'p> without GIL.
|
|
|
|
}
|