Re: [Tutor] (no subject)

2006-01-13 Thread Alan Gauld
Hello David, > Thanks in advance for any help!How do you create a script in > python...sorry > to be so remedial...first script. It sounds like you are a complete beginner to programming? If not forgive me for patronizing you with too much detail. A Python script is simply a text file. You can

[Tutor] defining __init__

2006-01-13 Thread Christopher Spears
I just read about __init__ in the chapter on operator overloading in Learning Python. What is __init__ exactly? Is it a special function that you can use to initialize attributes in an object upon creation? ___ Tutor maillist - Tutor@python.org http:/

Re: [Tutor] defining __init__

2006-01-13 Thread John Fouhy
On 13/01/06, Christopher Spears <[EMAIL PROTECTED]> wrote: > I just read about __init__ in the chapter on operator > overloading in Learning Python. What is __init__ > exactly? Is it a special function that you can use to > initialize attributes in an object upon creation? Pretty much ... Have

Re: [Tutor] defining __init__

2006-01-13 Thread Danny Yoo
On Thu, 12 Jan 2006, Christopher Spears wrote: > I just read about __init__ in the chapter on operator > overloading in Learning Python. What is __init__ > exactly? Is it a special function that you can use to > initialize attributes in an object upon creation? Hi Chris, Yes, that's it. __i

Re: [Tutor] defining __init__

2006-01-13 Thread S. D. Rose
One thing about classes that really tripped me up when I first started using classes was 'self' before the variable. When you have ' self.variable ' that is a variable that can be referenced by the parent. If there's no 'self' before the variable, you can not. For instance, if you have a routi

Re: [Tutor] defining __init__

2006-01-13 Thread Danny Yoo
On Fri, 13 Jan 2006, S. D. Rose wrote: > One thing about classes that really tripped me up when I first started > using classes was 'self' before the variable. When you have ' > self.variable ' that is a variable that can be referenced by the parent. > If there's no 'self' before the variable,