At 02:41 PM 11/22/2005, mike donato wrote: >Greetings, I am new student to programming and am experimenting with PYTHON. > >From what I have read, seems to be a very versatile language. In the >following excercise I am getting an error > >class String(str, Object):
try -> class String(str, object): > shift = 6 > > mask = ~0 << (31 - shift) > > def __hash__(self): > result = 0 > for c in self: > result = ((result & String.mask) ^ > result << String.shift ^ ord(c)) & sys.maxint > return result > > # ... > > > >Traceback (most recent call last): > File "<pyshell#0>", line 11, in -toplevel- > class String(str, Object): >NameError: name 'Object' is not defined > >>> > >_________________________________________________________________ >Express yourself instantly with MSN Messenger! Download today it's FREE! >http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > >_______________________________________________ >Tutor maillist - Tutor@python.org >http://mail.python.org/mailman/listinfo/tutor _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor