Possible Bugs in substring program
One case that you missed is replication in the search string.

&gt;&gt;&gt; '1213' in StringClass('121213')
False
&gt;&gt;&gt; '1213' in '121213'
True


This is because your class is already past the second one before it sees a difference and has to start completely over.

Asides from that, the empty string and None cases are problems, as is mentioned in other answers.