algorithm does python use to compare two strings

2012-04-29 Thread J. Mwebaze
I am just wondering which specific algorithm does python use to compare two strings. Could it be the Longest common subsequence is the most u Regards -- *Mob UG: +256 (0) 70 1735800 | NL +31 (0) 6 852 841 38 | Gtalk: jmwebaze | skype: mwebazej | URL: www.astro.rug.nl/~jmwebaze /* Life runs

Re: algorithm does python use to compare two strings

2012-04-29 Thread Terry Reedy
On 4/29/2012 3:59 AM, J. Mwebaze wrote: I am just wondering which specific algorithm does python use to compare two strings. 'Python' does not use algorithms, implementations do. CPython may check id and or hash before doing a character-by-char comparison (or perhaps multiple chars at a time

Re: algorithm does python use to compare two strings

2012-04-29 Thread Terry Reedy
On 4/29/2012 6:05 AM, Terry Reedy wrote: On 4/29/2012 3:59 AM, J. Mwebaze wrote: I am just wondering which specific algorithm does python use to compare two strings. 'Python' does not use algorithms, implementations do. CPython may check id and or hash before doing a character-by-char

Re: algorithm does python use to compare two strings

2012-04-29 Thread Robert Kern
On 4/29/12 5:34 PM, Terry Reedy wrote: On 4/29/2012 6:05 AM, Terry Reedy wrote: On 4/29/2012 3:59 AM, J. Mwebaze wrote: I am just wondering which specific algorithm does python use to compare two strings. 'Python' does not use algorithms, implementations do. CPython may check id and or hash