You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently a PyTuple.create only supports converting from a Zig tuple struct.
When wrapping/unwrapping, it's the trampoline that decides which type a value should be converted into. In some cases, e.g. for call arguments, we know we want an args tuple and kwargs dict. It is then ambiguous whether an empty Zig struct should be converted to a PyTuple or PyDict.
Similarly, we would never convert anything into a PySet. And there is an ambiguity in how to handle []u8 as PyString or PyBytes.
The proposal suggests the trampoline has a default target for each type, but all types can be explicitly constructed from any compatible object using their create function (possibly rename to new?)
The text was updated successfully, but these errors were encountered:
Currently a PyTuple.create only supports converting from a Zig tuple struct.
When wrapping/unwrapping, it's the trampoline that decides which type a value should be converted into. In some cases, e.g. for call arguments, we know we want an args tuple and kwargs dict. It is then ambiguous whether an empty Zig struct should be converted to a PyTuple or PyDict.
Similarly, we would never convert anything into a PySet. And there is an ambiguity in how to handle
[]u8
as PyString or PyBytes.The proposal suggests the trampoline has a default target for each type, but all types can be explicitly constructed from any compatible object using their
create
function (possibly rename tonew
?)The text was updated successfully, but these errors were encountered: