-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* stop coercing `set / frozenset` to `list / tuple` * add `dict_key` and `dict_value` * add iterator support * more tests * use PyList directly for lax_list * catch errors in generator evaluation * fix mypy and more tests * remove unused dict_items code * make format Co-authored-by: Samuel Colvin <s@muelcolvin.com>
- Loading branch information
1 parent
42a465a
commit cfd5da7
Showing
8 changed files
with
332 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// TODO: remove this file once a new pyo3 version is released | ||
// with https://github.com/PyO3/pyo3/pull/2358 | ||
|
||
use pyo3::{ffi, pyobject_native_type_core, PyAny}; | ||
|
||
/// Represents a Python `dict_keys`. | ||
#[cfg(not(PyPy))] | ||
#[repr(transparent)] | ||
pub struct PyDictKeys(PyAny); | ||
|
||
#[cfg(not(PyPy))] | ||
pyobject_native_type_core!( | ||
PyDictKeys, | ||
ffi::PyDictKeys_Type, | ||
#checkfunction=ffi::PyDictKeys_Check | ||
); | ||
|
||
/// Represents a Python `dict_values`. | ||
#[cfg(not(PyPy))] | ||
#[repr(transparent)] | ||
pub struct PyDictValues(PyAny); | ||
|
||
#[cfg(not(PyPy))] | ||
pyobject_native_type_core!( | ||
PyDictValues, | ||
ffi::PyDictValues_Type, | ||
#checkfunction=ffi::PyDictValues_Check | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
use pyo3::prelude::*; | ||
|
||
#[cfg(not(PyPy))] | ||
mod _pyo3_dict; | ||
mod datetime; | ||
mod input_abstract; | ||
mod input_json; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.