Message288407
Thank you.
On Wed, Feb 22, 2017 at 9:22 PM, Serhiy Storchaka <report@bugs.python.org>
wrote:
>
> Serhiy Storchaka added the comment:
>
> > When I run the following code on Windows/Linux for < Python 3.6, I have
> no problems.
>
> You have a problem. Did you try to use the copied object? It is a broken
> Struct object.
>
> >>> copied = copy.deepcopy(this_fails)
> >>> copied.format
> >>> copied.size
> -1
> >>> copied.pack(42)
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> struct.error: pack expected -1 items for packing (got 1)
> >>> copied.unpack(b'abcd')
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> struct.error: unpack requires a bytes object of length -1
>
> Copying Struct object never worked. Now it raises an error rather than
> silently creating a broken object.
>
> ----------
> nosy: +serhiy.storchaka
> resolution: -> not a bug
> stage: -> resolved
> status: open -> closed
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue29628>
> _______________________________________
> |
|
Date |
User |
Action |
Args |
2017-02-23 05:27:22 | mesheb82 | set | recipients:
+ mesheb82, paul.moore, tim.golden, zach.ware, serhiy.storchaka, steve.dower |
2017-02-23 05:27:22 | mesheb82 | link | issue29628 messages |
2017-02-23 05:27:22 | mesheb82 | create | |
|