copying algorithm fixed (was incorrect)
copy_from loop body refactored into set_field function
get_discriminated_field method extracted
validate_copy_from used from struct and union, union copy_from refactored
get_padding and get_padding_size used
no, get_padding couldn't have been used here
case with encode_field passing terminal = False to substruct is covered
duplication removed
out and bytes renamed to data
encoding refactored - still raw array, but with single statement
decode_field contains optional decoding too, loop has 2 statements, bytes_read removed
field_name -> name, field_type -> tp
3rd element of descriptor tuples - padding - turns out to be irrelevant once padding became dynamic
add_padding a bit simplified
key -> idx rename
style: extra newlines removed
duplicated method removed
ProphyError established and user throughout prophy lib
map used to simplify array checking implementation
eq functions duplication removed