This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mesheb82
Recipients mesheb82, paul.moore, serhiy.storchaka, steve.dower, tim.golden, zach.ware
Date 2017-02-23.05:27:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CADJnEGGiK=v03YLx9LHTXLET6B_LHxW__eSqS6fMYO7EPi7Hwg@mail.gmail.com>
In-reply-to <1487827371.48.0.617420512659.issue29628@psf.upfronthosting.co.za>
Content
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>
> _______________________________________
>
History
Date User Action Args
2017-02-23 05:27:22mesheb82setrecipients: + mesheb82, paul.moore, tim.golden, zach.ware, serhiy.storchaka, steve.dower
2017-02-23 05:27:22mesheb82linkissue29628 messages
2017-02-23 05:27:22mesheb82create