Mark Juggurnauth-Thomas
Mark Juggurnauth-Thomas
Thanks for the report! The `PyUnicode_KIND` errors look concerning. It seems `kind` is a [bitfield](https://github.com/python/cpython/blob/9ad8f109ac037ac088e09dcd2da523322c5caf34/Include/cpython/unicodeobject.h#L199), so it must be packed differently so that the [Rust version of `PyUnicode_KIND`](https://github.com/dgrunwald/rust-cpython/blob/master/python3-sys/src/unicodeobject.rs#L493) is wrong...
This is probably a question for @gracinet.
You should be able to use **`into_object()`** to convert a `PyString` to a `PyObject`. (`into_py_object()` just converts to the downcasted type, which is already `PyString`).
(I'll update the docs later)
Thanks for the contribution! I think I understand this, but could you add some more comments in the commit message (and ideally improve the commit title, too, so that it...
The `\"D:\\\\Python375\"` part is suspicious, as it looks like the script has resolved the python interpreter's location to `D:\Python375`, which is highly unlikely - since this is Windows it should...
I'm fairly certain we don't want `()` to map to Python `None`, as empty tuples do exist in python, and I think we want to be clear about the difference...
Can you post samples of the errors you are seeing? Some sample code that fails would useful, too.
There is a working prototype on the [`markbt/rust/metavariable_expressions` branch](https://github.com/markbt/rust/tree/metavariable_expressions). This needs feature gating, and there are a couple of TODOs to resolve, but it's otherwise in reasonable shape. I'm planning...
### Update (2021-04-07) I've not yet started work on productionizing the prototype on the [`markbt/rust/metavariable_expressions` branch](https://github.com/markbt/rust/tree/metavariable_expressions). I plan to start later this month, free time permitting.