Why the 'self' argument?

Alex Martelli aleax at aleax.it
Sat Sep 6 03:43:37 EDT 2003


Grant Edwards wrote:
   ...
>> Hence my comment that requiring it is more complex than not
>> requiring it.
> 
> No, it's more complex the Java/Ruby way, since you have to have
> two sets of rules for what a name means depending on whether
> you're inside a "normal" function or a method.  In Python
> there's just one set of rules -- mostly.

Java and Ruby have no "normal functions" -- just methods.  Ruby
has what may LOOK like ordinary functions, but they're methods
of the module object...


Alex





More information about the Python-list mailing list