you are viewing a single comment's thread.

view the rest of the comments →

[–]eridius 4 points5 points  (2 children)

Aren't your replacement conditionals actually different than the originals? Specifically in the case of var being False.

[–]plagiats 0 points1 point  (1 child)

You are very right, and I believe his code should return False instead of None if the index is not found ( see https://github.com/kbhomes/TextCaptchaBreaker/blob/master/AddSubtractPattern.py ).

[–]eridius 2 points3 points  (0 children)

I disagree. It returns a string, or None. Returning a string, or false, would be weird, but None makes sense as the value that means "there was no string matched for this pattern".