there are few things wrong with this block on page 29. Where is the canonical place to issue notice of small errors?
>>> class MyList (object) # no : >>> def __init__(self,*a): self.a=a # self.a becomes a tuple and not a list afaik self.a=list(a) >>> def __len__(self): return len(self.a) >>> def __getitem__(self,i): return self.a[i] >>> def __setitem__(self,i,j): self.a[i]=j >>> b=MyList(3,4,5) >>> print b[1] 4 >>> a[1] =7 # a is undefined should read b[1]=7 >>> print b.a [3,7,5] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

