Deprecate self
D-Man
dsh8290 at rit.edu
Wed Apr 18 17:21:54 EDT 2001
On Wed, Apr 18, 2001 at 06:26:02PM +0200, Steve Purcell wrote:
| D-Man wrote:
| > It doesn't work quite as nicely with inner classes though :
|
| Probably the following will work:
|
| Bar.this.doSomething() ;
|
| instead of
| this.doSomething() ;
Yes, but it still isn't the prettiest thing.
| Anyway, Jikes isn't the most reliable java compiler when it comes to
| inner classes. Your example will probably work fine with javac.
Nope, javac says the same thing (just spelled slightly differently
;-)). After all, with the inner class you have a new object. That
object can be referred to by 'this' inside (non-static) methods of the
class. Thus I want 'this' to magically unambiguously refer to two
different objects at the same time.
-D
BTW, Where have you seen a problem with jikes? (this should probably
be taken off-list since it is java specific, not actually python
related)
More information about the Python-list
mailing list