• Raymond Hettinger's avatar
    SF #1022953: binascii.a2b_hqx("") raises SystemError · 658717ed
    Raymond Hettinger yazdı
    Several functions adopted the strategy of altering a full lengthed
    string copy and resizing afterwards.  That would fail if the initial
    string was short enough (0 or 1) to be interned.  Interning precluded
    the subsequent resizing operation.
    
    The solution was to make sure the initial string was at least two
    characters long.
    
    Added tests to verify that all binascii functions do not crater when
    given an empty string argument.
    658717ed
test_binascii.py 5.79 KB