intelhex icon indicating copy to clipboard operation
intelhex copied to clipboard

padding byte not retained in slices

Open itayperl opened this issue 4 years ago • 1 comments

Hello,

In the current version (2.3.0), the padding byte resets to 0xFF when a slice is taken:

In [14]: ih.padding
Out[14]: 0

In [15]: ih[:4].padding
Out[15]: 255

It would make sense to copy the padding byte to the new instance.

itayperl avatar Jul 22 '21 11:07 itayperl

Yep, makes sense.

чт, 22 июл. 2021 г., 14:58 Itay Perl @.***>:

Hello,

In the current version (2.3.0), the padding byte resets to 0xFF when a slice is taken:

In [14]: ih.padding Out[14]: 0

In [15]: ih[:4].padding Out[15]: 255

It would make sense to copy the padding byte to the new instance.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/python-intelhex/intelhex/issues/56, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAUIG6Q3FJBD2KHQOOM3JLTZABWPANCNFSM5AZ3IEVA .

bialix avatar Jul 22 '21 21:07 bialix