[New-bugs-announce] [issue46900] marshal.dumps represents the same list object differently
William Dreese
report at bugs.python.org
Wed Mar 2 09:40:17 EST 2022
New submission from William Dreese <wdreese123 at gmail.com>:
Hello,
I've been working with the marshal package and came across this issue (I think) -
Python 3.9.10 Interpreter
(Same output in 3.11.0a5+ (heads/master:b6b711a1aa) on darwin)
>>> import marshal
>>> var_example = [(1,2,3),(4,5,6)]
>>> var_marshaled = marshal.dumps(var_example)
>>> raw_marshaled = marshal.dumps([(1,2,3),(4,5,6)])
>>> def pp(to_print):
>>> [print(byt) for byt in to_print]
>>> pp(var_marshaled)
219
2
0
0
0
41
3
233
1
0
0
0
233
2
0
0
0
233
3
0
0
0
169
3
233
4
0
0
0
233
5
0
0
0
233
6
0
0
0
91
2
0
0
0
41
3
233
1
0
0
0
233
2
0
0
0
233
3
0
0
0
169
3
233
4
0
0
0
233
5
0
0
0
233
6
0
0
0
>>> pp(raw_marshaled)
219
2
0
0
0
169
3
233
1
0
0
0
233
2
0
0
0
233
3
0
0
0
169
3
233
4
0
0
0
233
5
0
0
0
233
6
0
0
0
91
2
0
0
0
169
3
233
1
0
0
0
233
2
0
0
0
233
3
0
0
0
169
3
233
4
0
0
0
233
5
0
0
0
233
6
0
0
0
The difference above lies in the byte representation of the tuple type (41 in the variable version and 169 in the raw version). Is this intended behavior?
----------
components: C API
messages: 414362
nosy: Dreeseaw
priority: normal
severity: normal
status: open
title: marshal.dumps represents the same list object differently
type: behavior
versions: Python 3.11
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46900>
_______________________________________
More information about the New-bugs-announce
mailing list