Deprecate self

Just van Rossum just at letterror.com
Wed Apr 18 16:31:28 EDT 2001


[Rainer Deyke]
> The relationship of a method to the object on which it is called is
> analogous to the relationship between a free function and its module,

[Alex Martelli]
> Aha, here's where you see the inconsistency.  The analogy is just
> not there. [ ... ]

[Rainer]
> The analogy is not universally applicable, but it is most certainly "there".

Modules don't have instances. Sure, modules are in many ways like classes,
but they're not at all like instances. And only with instances the self
discussion becomes interesting. Your analogy is moot.

[Alex]
> Python's scoping is crystal-simple (up to 2.1 excluded -- I have
> not yet delved into the new lexical scoping things deep enough
> to underwrite their simplicity, although one does hope from PEP
> reading & such things:-).

[Rainer]
> Lack of lexical scoping is another thing Python got wrong. 

Eh? Python _has_ lexical scoping (but scopes can't nest until 2.1).

> It causes code
> not to work when moved from one scope to another.  However, I had not
> intended to start a general discussion of scoping in programming languages.

Have you looked at the (optional, for now) new scoping rules in 2.1 that
Alex alluded to?

Just



More information about the Python-list mailing list