Lie a écrit :
On Jan 16, 9:23 pm, Bjoern Schliessmann usenet-
[EMAIL PROTECTED] wrote:
Lie wrote:
[EMAIL PROTECTED] wrote:
I used to systematically use it - like I've always systematically
used 'this' in C++ and Java.
And that is what reduces readability.
IMHO not, IOPHO not. This is the
Please stop taking my words to its letters.
So we're supposed to actually guess what you really mean ???
That's what human does, otherwise you'll Fail the Turing Test.
Personally, I've seen many C++ programs with complex class designs
where it definitely helps to consistently use this-.
(messed up references?)
Lie wrote:
Please again, stop taking letters to the words
Please don't mix up followups.
Regards,
Björn
--
BOFH excuse #11:
magnetic interference from money/credit cards
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 16, 9:23 pm, Bjoern Schliessmann usenet-
[EMAIL PROTECTED] wrote:
Lie wrote:
[EMAIL PROTECTED] wrote:
I used to systematically use it - like I've always systematically
used 'this' in C++ and Java.
And that is what reduces readability.
IMHO not, IOPHO not. This is the nth time
On Jan 15, 9:00 pm, Bruno Desthuilliers bruno.
[EMAIL PROTECTED] wrote:
Lie a écrit :
On Jan 7, 2:46 am, Bruno Desthuilliers
[EMAIL PROTECTED] wrote:
Lie a écrit :
On Jan 5, 5:40 pm, [EMAIL PROTECTED] wrote:
Jeroen Ruigrok van der Werven wrote:
Shouldn't this be:
self.startLoc =
Lie wrote:
[EMAIL PROTECTED] wrote:
I used to systematically use it - like I've always systematically
used 'this' in C++ and Java.
And that is what reduces readability.
IMHO not, IOPHO not. This is the nth time (n 1) this discussion
comes up here. If I have learned one thing from those
Lie a écrit :
On Jan 15, 9:00 pm, Bruno Desthuilliers bruno.
[EMAIL PROTECTED] wrote:
Lie a écrit :
On Jan 7, 2:46 am, Bruno Desthuilliers
[EMAIL PROTECTED] wrote:
Lie a écrit :
(snip)
No, seriously it isn't Java habits only, most other languages wouldn't
need explicit calling of class
Lie a écrit :
On Jan 7, 2:46 am, Bruno Desthuilliers
[EMAIL PROTECTED] wrote:
Lie a écrit :
On Jan 5, 5:40 pm, [EMAIL PROTECTED] wrote:
Jeroen Ruigrok van der Werven wrote:
Shouldn't this be:
self.startLoc = start
self.stopLoc = stop
Thanks! Of course it should. Old Java habits die
On Jan 7, 2:46 am, Bruno Desthuilliers
[EMAIL PROTECTED] wrote:
Lie a écrit :
On Jan 5, 5:40 pm, [EMAIL PROTECTED] wrote:
Jeroen Ruigrok van der Werven wrote:
Shouldn't this be:
self.startLoc = start
self.stopLoc = stop
Thanks! Of course it should. Old Java habits die slowly.
No,
Lie a écrit :
On Jan 5, 5:40 pm, [EMAIL PROTECTED] wrote:
Jeroen Ruigrok van der Werven wrote:
Shouldn't this be:
self.startLoc = start
self.stopLoc = stop
Thanks! Of course it should. Old Java habits die slowly.
No, seriously it isn't Java habits only, most other languages wouldn't
On Jan 5, 2008 11:31 AM, [EMAIL PROTECTED] wrote:
import tok
class code:
def __init__( self, start, stop ):
startLoc = start
stopLoc = stop
class token(code):
pass
Apart from the missing self, remember that the __init__(...) of the
base classes is not
On Jan 5, 4:53 am, Bjoern Schliessmann usenet-
[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] 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++,
On Jan 6, 2008 6:59 PM, Dan Bishop [EMAIL PROTECTED] wrote:
My employer has us use the m_ convention.
I wonder why Bjarne made this- optional in the first place.
--
http://mail.python.org/mailman/listinfo/python-list
I think implicit this- is somewhat more defensible. If 'this' were not a
Working on parser for my language, I see that all classes (Token,
Production, Statement, ...) have one thing in common. They all
maintain start and stop positions in the source text. So it seems
logical to have them all inherit from a base class that defines those,
but this doesn't work:
import
-On [20080105 11:36], [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote:
class code:
def __init__( self, start, stop ):
startLoc = start
stopLoc = stop
Shouldn't this be:
self.startLoc = start
self.stopLoc = stop
?
--
Jeroen Ruigrok van der Werven asmodai(-at-)in-nomine.org /
On Jan 5, 10:31 am, [EMAIL PROTECTED] wrote:
...
class code:
def __init__( self, start, stop ):
startLoc = start
stopLoc = stop
...
You've forgotten the explicit self.
def __init__( self, start, stop ):
self.startLoc = start
self.stopLoc = stop
--
Jeroen Ruigrok van der Werven wrote:
Shouldn't this be:
self.startLoc = start
self.stopLoc = stop
Thanks! Of course it should. Old Java habits die slowly.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] 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
On Jan 5, 5:40 pm, [EMAIL PROTECTED] wrote:
Jeroen Ruigrok van der Werven wrote:
Shouldn't this be:
self.startLoc = start
self.stopLoc = stop
Thanks! Of course it should. Old Java habits die slowly.
No, seriously it isn't Java habits only, most other languages wouldn't
need explicit
19 matches
Mail list logo