On June 14, 2022 10:29:40 PM CDT, Mike Dewhirst <mi...@dewhirst.com.au> wrote:
>On 14/06/2022 11:20 pm, Ryan Nowakowski wrote:
>> 
>> Summing the ordinal of the characters won't catch transposition:
>> 
>> >>> chars = 'ab'
>> >>> sum([ord(c) for c in chars])
>> 195
>> >>> chars = 'ba'
>> >>> sum([ord(c) for c in chars])
>> 195
>> 
>> Better to use a real hash algorithm if you're trying to detect changes.  My 
>> note above about hashing not being required is because you don't need to 
>> detect changes because you explicitly already know when changes are being 
>> made.
>> 
>
>Thanks Ryan.
>
>It is all working now. I append " - No longer relevant" to the note title if 
>any change is detected. Otherwise the note gets deleted.
>

Good to hear! Seems like an interesting project.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/935A6EB4-032D-4264-BD83-24508764B189%40fattuba.com.

Reply via email to