Re: Basic inheritance question



MartinRinehart@xxxxxxxxx wrote:
Jeroen Ruigrok van der Werven wrote:

self.startLoc = start
self.stopLoc = stop

Thanks! Of course it should. Old Java habits die slowly.

That's not really a Java habit. In Java and C++, personally I like
to write

this.startLoc = start
this.stopLoc = stop

It makes much clearer what a field and what a "normal" variable is
in those languages.

Regards,


Björn

--
BOFH excuse #294:

PCMCIA slave driver

.



Relevant Pages

  • Re: Basic inheritance question
    ... Lie a écrit: ... Old Java habits die slowly. ... No, seriously it isn't Java habits only, most other languages wouldn't ...
    (comp.lang.python)
  • Re: Basic inheritance question
    ... Old Java habits die slowly. ... No, seriously it isn't Java habits only, most other languages wouldn't ... need explicit calling of class name. ...
    (comp.lang.python)