on a related topic, if you're concerned about security, esp. of your
instance attributes, new-style classes offer you significantly more
control over them using descriptors (including properties [and to a
lesser extent, slots]). there is plenty of docs available on those, so
i'll defer describing t
Chris, you are right.
He (Alan) hits the bull's eye, always !!
Cheers...
Asrarahmed
On 10/25/06, Chris Hengge <[EMAIL PROTECTED]> wrote:
I dont know about the rest of you, but this thread posting from Alan cleared up some fuzzyness I've had about classes. /me is happier using this. instead of
Thanks a lot for explanation.
Regards,
Asrarahmed
On 10/25/06, Alan Gauld <[EMAIL PROTECTED]> wrote:
"Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote
> Why is it necessary to explicity use self argument in the class> functionsBecause Guido made it that way. :-)But he did it for good reasons which
I dont know about the rest of you, but this thread posting from Alan cleared up some fuzzyness I've had about classes. /me is happier using this. instead of self. =DGreat post!
On 10/25/06, Alan Gauld <[EMAIL PROTECTED]> wrote:
"Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote> Why is it necessary to ex
"Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote
> Why is it necessary to explicity use self argument in the class
> functions
Because Guido made it that way. :-)
But he did it for good reasons which others have pointed out already.
Although languages like C++ and Java use implicit object reference
Asrarahmed Kadri googlemail.com> writes:
> the use of 'self' keyword really confuses me.
I see how it can annoy you, but not how it can *confuse* you - if anything,
"self" removes any confusion about whether you're looking at a local variable or
an object property. By the way, the use of specia
Asrarahmed Kadri escribió:
>
>
> Folks...
>
> Please dont take it in a wrong sense. But I have a point to make
> regarding OOP and the way it is implemented in Python.
>
> Why is it necessary to explicity use self argument in the class
> functions ?? I feel the language/interpreter shoul
On 10/25/06, Asrarahmed Kadri <[EMAIL PROTECTED]> wrote:
> Why is it necessary to explicity use self argument in the class functions
> ?? I feel the language/interpreter should figure out which object has called
> the function? Isnt it ? (the use of 'self' keyword really confuses me. and
> to make
Folks...
Please dont take it in a wrong sense. But I have a point to make regarding OOP and the way it is implemented in Python.
Why is it necessary to explicity use self argument in the class functions ?? I feel the language/interpreter should figure out which object has called the functi