Python 3.1.1 (r311:74543, Aug 24 2009, 18:44:04) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "copyright", "credits" or "license()" for more information. >>> ================================ RESTART ================================ >>> >>> Sentence('hey there') + Sentence('how goes it') Sentence('hey there how goes it') >>> ================================ RESTART ================================ >>> >>> Sentence('hey there') + Sentence('how goes it') Sentence('hey there how goes it') >>> ================================ RESTART ================================ >>> >>> Sentence('hey there') + Sentence('how goes it') Traceback (most recent call last): File "", line 1, in Sentence('hey there') + Sentence('how goes it') File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 25, in __add__ assert isinstance(other,Sentence) # could consider loosening this AssertionError >>> ================================ RESTART ================================ >>> >>> Sentence('hey there') + Sentence('how goes it') Traceback (most recent call last): File "", line 1, in Sentence('hey there') + Sentence('how goes it') File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) File "/Users/gustavus/Desktop/Sentence.py", line 26, in __add__ return Sentence(str(self + ' ' + other)) RuntimeError: maximum recursion depth exceeded >>> ================================ RESTART ================================ >>> >>> Sentence('hey there') + Sentence('how goes it') Sentence('hey there how goes it') >>> Sentence('hey there') + 334 Sentence('hey there 334') >>> str(334) '334' >>> Sentence('hey there') + ['what','is','up'] Sentence("hey there ['what', 'is', 'up']") >>> str(['what','is','up']) "['what', 'is', 'up']" >>> str('foo') 'foo' >>> Sentence('hey there') + 'I am getting tired of asking what is up' Sentence('hey there I am getting tired of asking what is up') >>> 'foo' + Sentence('bar') Traceback (most recent call last): File "", line 1, in 'foo' + Sentence('bar') TypeError: Can't convert 'Sentence' object to str implicitly >>> ================================ RESTART ================================ >>> >>> s = Sentence('hey there') >>> s Sentence('hey there') >>> s.getWords() ['hey', 'there'] >>> words = s.getWords() >>> words ['hey', 'there'] >>> words[0] 'hey' >>> s.getWords()[0] 'hey' >>> s[0] 'hey' >>> s[1] 'there' >>> Sentence('what is the meaning of life')[4] 'of' >>> Sentence('what is the meaning of life')[-1] 'life' >>> Sentence('what is the meaning of life')[3:] ['meaning', 'of', 'life'] >>> Sentence('what is the meaning of life')[2:5] ['the', 'meaning', 'of'] >>> for word in s: print(word) hey there >>> ================================ RESTART ================================ >>> >>> for word in s: print(word) Traceback (most recent call last): File "", line 1, in for word in s: NameError: name 's' is not defined >>> s = Sentence('hey there') >>> for word in s: print(word) Traceback (most recent call last): File "", line 1, in for word in s: TypeError: 'Sentence' object is not iterable >>> ================================ RESTART ================================ >>> >>> s = Sentence('hey there') >>> s[0] 'hey' >>> s[1] 'there' >>> s[2] Traceback (most recent call last): File "", line 1, in s[2] File "/Users/gustavus/Desktop/Sentence.py", line 28, in __getitem__ return self.getWords()[item] IndexError: list index out of range >>> [word.upper() for word in s] ['HEY', 'THERE'] >>> 'hey' in s True >>> 'there' in s True >>> 'the' in s False >>> ================================ RESTART ================================ >>> >>> s = Sentence('hey there') >>> 'there' in s Traceback (most recent call last): File "", line 1, in 'there' in s TypeError: argument of type 'Sentence' is not iterable >>> ================================ RESTART ================================ >>> >>> len(Sentence('what is the length of this')) Traceback (most recent call last): File "", line 1, in len(Sentence('what is the length of this')) File "/Users/gustavus/Desktop/Sentence.py", line 31, in __len__ return getNumWords() NameError: global name 'getNumWords' is not defined >>> ================================ RESTART ================================ >>> >>> len(Sentence('what is the length of this')) 6 >>> ================================ RESTART ================================ >>> >>> s = Sentence('this is a test') >>> s.words ['this', 'is', 'a', 'test'] >>> ================================ RESTART ================================ >>> >>> s = Sentence('this is a test') >>> s[3] 'test' >>> len(s) 4 >>>