Newbie: Classes
KefX
keflimarcusx at aol.comNOSPAM
Sun Oct 26 22:54:32 EST 2003
More information about the Python-list mailing list
Sun Oct 26 22:54:32 EST 2003
- Previous message (by thread): Newbie: Classes
- Next message (by thread): Newbie: Classes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>If I remember correctly Java also passes 'this' into funtions but its >done implicitly. Its there but you just don't see it. Exactly, but it may or may not do it exactly the same way it does parameters; in Java it's an implementation detail, whereas in Python it's part of all of the methods' interfaces. So that's why I didn't say it gets "passed in", but in a sense, it is. It should be noted that ALL of the methods of a class should have the 'self' parameter, or else you can't do instance.method(), only classname.method(), and I don't think you really gain from this arbitrary restriction. - Kef
- Previous message (by thread): Newbie: Classes
- Next message (by thread): Newbie: Classes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list