self argument
london999 at my-deja.com
london999 at my-deja.com
Sat Feb 26 04:00:07 EST 2000
I am very new to Python, but it appears that every function defined in a
class must have self as a first variable name. Assuming that is the
case, it would be nice if there was an error message given when the
interpreter encounters a function that is defined without self (rather
than giving the error message "TypeError: no arguments expected" when
the function is called. Even better, it would be nice (probably too late
I know), if self was defined implicitly as the "this" pointer is in C++.
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list