ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> Jython-users
Jython-users
Re: [Jython-users] Why is self used so much
by Doug Landauer other posts by this author
Feb 28 2002 8:49PM messages near this date
[Jython-users] Why is self used so much | Re: [Jython-users] Why is self used so much
> ... wondering why it seems that every variable used has to
> have self prefixed to it.

Global and local variables do not require the "self." prefix;
it is only members -- aka instance variables -- and methods
that require this.

> I'd just like to know why this is needed or if im doing something wrong.

Or both!  (Your error is not capitalizing the "I" and omitting
the apostrophe.  Mine is in pointing that out.  You're welcome...)


See http://www.python.org/doc/Humor.html#zen ... the second item says

   Explicit is better than implicit.

That's the guiding principle for why this part of the language
was designed this way.

   channeling-the-Tim-bot-channeling-Guido-ly,
     -- Doug

_______________________________________________
Jython-users mailing list
Jython-users@[...].net
https://lists.sourceforge.net/lists/listinfo/jython-users
Thread:
Martin
Doug Landauer
hamish

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved