Re: Extending built-in objects/classes

2006-07-03 Thread John Machin
On 3/07/2006 10:01 PM, Jon Clements wrote: > John Machin wrote: > (snip) >> You have already been told: you don't need "self.", you just write >> "self" ... self *is* a reference to the instance of the mystr class that >> is being operated on by the substr method. >> > (snip) > > I get that; let m

Re: Extending built-in objects/classes

2006-07-03 Thread Jon Clements
John Machin wrote: (snip) > > You have already been told: you don't need "self.", you just write > "self" ... self *is* a reference to the instance of the mystr class that > is being operated on by the substr method. > (snip) I get that; let me clarify why I asked again. As far as I'm aware, the

Re: Extending built-in objects/classes

2006-07-03 Thread John Machin
On 3/07/2006 7:55 PM, Jon Clements wrote: > [EMAIL PROTECTED] wrote: >> My experiance is mostly with old-style classes, but here goes. >> >> first off, the question is actually easier than you think. >> After all, self is an instance of a string, so self[3:4] would grab >> the slice of character

Re: Extending built-in objects/classes

2006-07-03 Thread Jon Clements
[EMAIL PROTECTED] wrote: > My experiance is mostly with old-style classes, but here goes. > > first off, the question is actually easier than you think. > After all, self is an instance of a string, so self[3:4] would grab > the slice of characters between 3 and 4 =) > That's kind of funky - I

Re: Extending built-in objects/classes

2006-07-03 Thread [EMAIL PROTECTED]
My experiance is mostly with old-style classes, but here goes. first off, the question is actually easier than you think. After all, self is an instance of a string, so self[3:4] would grab the slice of characters between 3 and 4 =) as for __init__, what I have found is that if you do not incl