8000 py_serde doesn't distinguish list and tuple · Issue #4303 · RustPython/RustPython · GitHub
[go: up one dir, main page]

Skip to content

py_serde doesn't distinguish list and tuple #4303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
youknowone opened this issue Dec 2, 2022 · 1 comment
Open

py_serde doesn't distinguish list and tuple #4303

youknowone opened this issue Dec 2, 2022 · 1 comment

Comments

@youknowone
Copy link
Member

} else if let Some(list) = self.pyobject.payload_if_subclass::<PyList>(self.vm) {
serialize_seq_elements(serializer, &list.borrow_vec())
} else if let Some(tuple) = self.pyobject.payload_if_subclass::<PyTuple>(self.vm) {
serialize_seq_elements(serializer, tuple)
} else if self.pyobject.fast_isinstance(self.vm.ctx.types.dict_type) {

cc @lastmjs

@arihant2math
Copy link
Collaborator

How would it ideally do this, without adding nesting or anything?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0