Deprecate self
D-Man
dsh8290 at rit.edu
Wed Apr 18 17:09:28 EDT 2001
[Luke wrote:]
| Java's system works just fine. It is assumed when you are writing a
| class, that a variable is part of that class. It makes more sense.
| After all why
Are you sure? Did you write 'static' or not? If not, it is part of
an _instance_ of the class, not the class itself.
On Wed, Apr 18, 2001 at 12:42:25PM -0500, Luke wrote:
| > looks like you haven't studied Python's class model close enough
| > to actually know what you're talking about here...
| >
| > (hint: how do you declare class members in Python?)
| >
| > Cheers /F
|
| That's my point exactly. You don't need it.
You declare _class_ members by assigning to them in the _class_ body.
You can't declare (or change the value of) _class_ members inside the
body of a function in the class unless you explicitly use the class
name.
Now I think you really mean _instance_ members. How do you declare
instance members in Python?
-D
More information about the Python-list
mailing list