Changes between Initial Version and Version 1 of Ticket #23411, comment 17


Ignore:
Timestamp:
07/13/17 13:48:56 (4 years ago)
Author:
jdemeyer
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23411, comment 17

    initial v1  
    88    raise ValueError(f"expected a pickle with {expected_size} bytes, got {len(Data)} instead")
    99}}}
     10EDIT: note the swapped conditions. It is possible that `expected_size == expected_size_for_old_pickle`.
    1011
    1112And a small detail: you write twice `x = PyString_AsString(Data)` while once (outside the branch) should be sufficient.