Open AndrewHUNGNguyen opened 9 months ago
@extinctsion assign this issue to me.
I think it's practically impossible to include all unicode punctuations as one may create custom using their own unicode. Hence, it would be better to only include those punctuations which are frequently used.
I think it's practically impossible to include all unicode punctuations as one may create custom using their own unicode. Hence, it would be better to only include those punctuations which are frequently used.
That's true. I just thought of this to think of the long term impact of this method. Rather than only considering most commonly used punctuation marks, how about we modify the parameters of the method in the sense that we let users of this method to remove a punctuation marks or list of punctuation marks of their choice?
If we should keep remove_punctuation as is, then we will stick with just resolving the defect in is_palindrome().
@extinctsion
@extinctsion in case you want to modify is_palindrome only, I created a PR at #75
@extinctsion I created a PR at #76
Thanks. Merged it in the main branch. Now if you will raise any PR, it will test for all the test cases and then it will be approved for merge.
is_palindrome() fails test cases where the string is a sentence with the same characters.
remove_punctuation() fails on unicode punctuations like © and ™. We may need to include unicode characters as punctuations to remove as well listed at https://www.compart.com/en/unicode/category/Po
@extinctsion let me know your thoughts on punctuations we need to include.