You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
running Soundex on a string changes the original string to uppercase.
That's all well and good, but interestingly, it also changes a deep copy of the original string! that seems pretty wrong...
#!python
>>>x = "blabla"
>>>y = copy.deepcopy(x)
>>>sndex = fuzzy.soundex(32)
>>>print sndex(x)
B4140000000000000000000000000000
>>>print x
BLABLA
>>>print y
BLABLA
>>>#running soundex on x changes deep copy y!
Original comment byRohan Anand (Bitbucket: rohan_anand, GitHub: Unknown):
This fork has got it fixed : https://bitbucket.org/dhellmann/fuzzy
Basically deepcopy doesn't work because strings are immutable in python but since the library internally makes a C call, it gets modified in place by C which should have not happened.
Originally reported by: Anonymous
running Soundex on a string changes the original string to uppercase.
That's all well and good, but interestingly, it also changes a deep copy of the original string! that seems pretty wrong...
The text was updated successfully, but these errors were encountered: