Does the first argument of a method *has to be* self?
Johan Wouters
Johan.Wouters at p98.f112.n480.z2.fidonet.org
Thu Jul 1 10:09:33 EDT 1999
More information about the Python-list mailing list
Thu Jul 1 10:09:33 EDT 1999
- Previous message (by thread): Does the first argument of a method *has to be* self?
- Next message (by thread): Python in the public eye !
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: Johan Wouters <johanw at easics.be> Gerrit Holl wrote: > > Hello, > > I never saw code where the first argument of a method wasn't self. Is it > in theory possible? As one thinks about it, the first argument being self (the instance) is a handy feature. Why would you want to put it somewhere else? As the documentation states "self" is just some conventional name. Renaming self into something else is probably a bad idea as it will make your code less readable for others (and YOU as time passes!). Experience shows that having conventions is a powerful way to make life and code maintenance easier. Kind regards, =================================================================== Johan Wouters === Easics === ASIC Designer === System-on-Chip design services === Tel: +32-16-395 616 =================================== Fax: +32-16-395 619 Interleuvenlaan 86, B-3001 Leuven, BELGIUM mailto:johanw at easics.be http://www.easics.com
- Previous message (by thread): Does the first argument of a method *has to be* self?
- Next message (by thread): Python in the public eye !
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list