Re: Py3K idea: why not drop the colon?

2006-11-17 Thread Hendrik van Rooyen
Fredrik Lundh [EMAIL PROTECTED] wrote: have anyone counted the number of colons used in this way by the OP, in his first few posts ? (if there isn't a name for the law that states that the number for a let's remove the colons proposal is always greater than zero, someone should come up with

Re: Py3K idea: why not drop the colon?

2006-11-16 Thread Magnus Lycka
John Salerno wrote: personally, i don't mind the colon and see no need to lose it, but if we are talking in the realm of aesthetics, it actually seems like it would be cleaner if it weren't there...sure, at first everyone who is used to it might feel like something is missing, or the line

Re: Py3K idea: why not drop the colon?

2006-11-16 Thread Fredrik Lundh
Magnus Lycka wrote: Which is the better writing style for text intended for human readers? I have some things to say: Seagulls belong in the sky. Colon fits in the text. I have some things to say { Seagulls belong in the text. Colon fits in the belly. } have

Re: Py3K idea: why not drop the colon?

2006-11-16 Thread Steve Holden
Fredrik Lundh wrote: Magnus Lycka wrote: Which is the better writing style for text intended for human readers? I have some things to say: Seagulls belong in the sky. Colon fits in the text. I have some things to say { Seagulls belong in the text. Colon fits in the

Re: Py3K idea: why not drop the colon?

2006-11-16 Thread Fredrik Lundh
Steve Holden wrote: I'm always surprised by the amount of energy that's put into this type of discussion - even the OP has suggested that this isn't a big issue. If it's not a big issue why is this thread still going? http://www.bikeshed.org/ /F --

Re: Py3K idea: why not drop the colon?

2006-11-16 Thread Steve Holden
Fredrik Lundh wrote: Steve Holden wrote: I'm always surprised by the amount of energy that's put into this type of discussion - even the OP has suggested that this isn't a big issue. If it's not a big issue why is this thread still going? http://www.bikeshed.org/ I deliberately

Re: Py3K idea: why not drop the colon?

2006-11-16 Thread Fredrik Lundh
Steve Holden wrote: y is this thread still going? http://www.bikeshed.org/ I deliberately avoided using that analogy, but I'm sorry to say it *does* apply. I'd hate to see c.l.py descend to becoming a wibble group. I switched to a reader that lets me kill threads with a single keypress a

Re: Py3K idea: why not drop the colon?

2006-11-16 Thread Neil Cerutti
On 2006-11-16, Steve Holden [EMAIL PROTECTED] wrote: I'm always surprised by the amount of energy that's put into this type of discussion - even the OP has suggested that this isn't a big issue. If it's not a big issue why is this thread still going? Every language has a syntax. Why not just

Re: Py3K idea: why not drop the colon?

2006-11-16 Thread Ron Adam
Steve Holden wrote: I'm always surprised by the amount of energy that's put into this type of discussion - even the OP has suggested that this isn't a big issue. If it's not a big issue why is this thread still going? Every language has a syntax. Why not just accept it as a given and get

Re: Py3K idea: why not drop the colon?

2006-11-15 Thread Antoon Pardon
On 2006-11-15, Steven D'Aprano [EMAIL PROTECTED] wrote: On Tue, 14 Nov 2006 12:01:05 +, Antoon Pardon wrote: On 2006-11-13, Ben Finney [EMAIL PROTECTED] wrote: Michael Hobbs [EMAIL PROTECTED] writes: To be clear, this is the actual thrust of my argument. It seems redundant to have

Re: Py3K idea: why not drop the colon?

2006-11-15 Thread Christophe
Stephen Eilert a écrit : Well, I *hate* underscores with a passion. So it is kinda frustrating that I *have* to say __init__. The fact that the coding conventions for Python suggest things such as methods_called_this_or_that do not help. Everything else seems fine, since if there's voodoo

Re: Py3K idea: why not drop the colon?

2006-11-15 Thread Steven D'Aprano
On Wed, 15 Nov 2006 08:22:46 +, Antoon Pardon wrote: Redundancy is not something to be valued for its own sake. It is only valuable when it actually gains you something. In the same way it is not something to be eliminated for its own sake. On the contrary, redundancy implies more work

Re: Py3K idea: why not drop the colon?

2006-11-15 Thread Antoon Pardon
On 2006-11-15, Steven D'Aprano [EMAIL PROTECTED] wrote: On Wed, 15 Nov 2006 08:22:46 +, Antoon Pardon wrote: Redundancy is not something to be valued for its own sake. It is only valuable when it actually gains you something. In the same way it is not something to be eliminated for its

Re: Py3K idea: why not drop the colon?

2006-11-14 Thread Hendrik van Rooyen
Simon Brunning [EMAIL PROTECTED] Wrote: On 11/11/06, Fredrik Lundh [EMAIL PROTECTED] wrote: Hendrik van Rooyen wrote: blue is red or green or yellow *grin* - this can be construed as a weakness in Python - it's boolean logic, and it's incompatible with human use of the same

Re: Py3K idea: why not drop the colon?

2006-11-14 Thread Hendrik van Rooyen
Robert Kern [EMAIL PROTECTED] wrote: Michael Hobbs wrote: True enough. Although, I have to ask how many times you define a new function only to have Python spit a syntax error out at you saying that you forgot a colon. It happens to me all the time. (Usually after an else) If you'd

Re: Py3K idea: why not drop the colon?

2006-11-14 Thread Fredrik Lundh
Antoon Pardon wrote: Why not? My impression is that removing redundancy is considered a positive thing here in c.p.l. so why are you still here? /F -- http://mail.python.org/mailman/listinfo/python-list

Re: Py3K idea: why not drop the colon?

2006-11-14 Thread Antoon Pardon
On 2006-11-14, Fredrik Lundh [EMAIL PROTECTED] wrote: Antoon Pardon wrote: Why not? My impression is that removing redundancy is considered a positive thing here in c.p.l. so why are you still here? Because I have a different opinion and I don't need your permission. -- Antoon Pardon --

Re: Py3K idea: why not drop the colon?

2006-11-14 Thread Antoon Pardon
On 2006-11-13, Steve Holden [EMAIL PROTECTED] wrote: John Salerno wrote: Fredrik Lundh wrote: John Salerno wrote: Anyway, the FAQ answer seems to be a weak argument to me. I agree. I was expecting something more technical to justify the colon, not just that it looks better. yeah, the

Re: Py3K idea: why not drop the colon?

2006-11-14 Thread Antoon Pardon
On 2006-11-13, Ben Finney [EMAIL PROTECTED] wrote: Michael Hobbs [EMAIL PROTECTED] writes: To be clear, this is the actual thrust of my argument. It seems redundant to have *both* line continuations and colons in compound statements. Why are you trying to remove redundancy? Why not? My

Re: Py3K idea: why not drop the colon?

2006-11-14 Thread Dan Lenski
Hendrik van Rooyen wrote: This is true - and it is actually also an intractable problem - if you look at what your daughter wrote, you get the feeling that you should be able to write an interpreter that can implement what she meant, because it is quite clear to you - until you try to write

Re: Py3K idea: why not drop the colon?

2006-11-14 Thread Robert Kern
Hendrik van Rooyen wrote: Robert Kern [EMAIL PROTECTED] wrote: Michael Hobbs wrote: True enough. Although, I have to ask how many times you define a new function only to have Python spit a syntax error out at you saying that you forgot a colon. It happens to me all the time. (Usually

Re: Py3K idea: why not drop the colon?

2006-11-14 Thread skip
Michael Hobbs wrote: True enough. Although, I have to ask how many times you define a new function only to have Python spit a syntax error out at you saying that you forgot a colon. It happens to me all the time. I confess I find myself in the position of a Yorkshire

Re: Py3K idea: why not drop the colon?

2006-11-14 Thread Terry Reedy
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I confess I find myself in the position of a Yorkshire Youngster - I don't believe you! Robert Okay, not often enough or annoyingly enough for me to remember Robert having done so. Perhaps seven years ago when I

Re: Py3K idea: why not drop the colon?

2006-11-14 Thread Stephen Eilert
Carl Banks escreveu: Steve Holden wrote: In fact most Python doesn't use such constructs, though I'll admit the occasional __init__ is more or less inevitable once you start using the object-oriented features more than casually. Occasional? I don't know about you, but I use __init__ in

Re: Py3K idea: why not drop the colon?

2006-11-14 Thread Hendrik van Rooyen
Dan Lenski [EMAIL PROTECTED] wrote: I think part of learning to think like a computer is learning to stop associating computer logic too strongly with the natural language meanings of and, or, and not. This is true - and you have left out but - Hendrik --

Re: Py3K idea: why not drop the colon?

2006-11-14 Thread Steven D'Aprano
On Tue, 14 Nov 2006 12:01:05 +, Antoon Pardon wrote: On 2006-11-13, Ben Finney [EMAIL PROTECTED] wrote: Michael Hobbs [EMAIL PROTECTED] writes: To be clear, this is the actual thrust of my argument. It seems redundant to have *both* line continuations and colons in compound statements.

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Simon Brunning
On 11/11/06, Fredrik Lundh [EMAIL PROTECTED] wrote: Hendrik van Rooyen wrote: blue is red or green or yellow *grin* - this can be construed as a weakness in Python - it's boolean logic, and it's incompatible with human use of the same terms in all contexts, not just Python. Indeed.

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Michael Hobbs
Steven D'Aprano wrote: On Fri, 10 Nov 2006 15:18:55 -0600, Michael Hobbs wrote: Ron Adam wrote: It is also an outline form that frequently used in written languages. Something python tries to do, is to be readable as if it were written in plain language where it is practical

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread John Salerno
Fredrik Lundh wrote: John Salerno wrote: Anyway, the FAQ answer seems to be a weak argument to me. I agree. I was expecting something more technical to justify the colon, not just that it looks better. yeah, the whole idea of treating programming languages as an interface between

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Michael Hobbs
Antoon Pardon wrote: On 2006-11-11, Steven D'Aprano [EMAIL PROTECTED] wrote: On Fri, 10 Nov 2006 13:16:32 -0600, Michael Hobbs wrote: Yeah, okay, I didn't read through the details of the PEP. I picked a bad example to illustrate a point that is still true. The FAQ also tries to

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Michael Hobbs
Georg Brandl wrote: Ron Adam wrote: Michael Hobbs wrote: The same problem that is solved by not having to type parens around the 'if' conditional, a la C and its derivatives. That is, it's unnecessary typing to no good advantage, IMHO. I was coding in Ruby for several months

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Michael Hobbs
Ron Adam wrote: [EMAIL PROTECTED] wrote: I'm not sure why '\'s are required to do multi-line before the colon. Special cases aren't special enough to break the rules. Georg A bit of a circular answer. Why the rule? - So not to break the rule?

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Michael Hobbs
Carsten Haese wrote: On Sat, 2006-11-11 at 23:18 -0800, Doug wrote: Michael Hobbs wrote: I think the colon could be omitted from every type of compound statement: 'if', 'for', 'def', 'class', whatever. Am I missing anything? Thanks, - Mike It is a very good idea as the

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Michael Hobbs
Ron Adam wrote: LOL, of course it would. I would expect that too after a suitable amount of 'brain washing', oops, I mean training and conditioning. ;-) Trust me, my brain is quite filthy and doesn't wash easily. I do appreciate aesthetics, which is why still stay with Python, even after

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Ron Adam
Michael Hobbs wrote: Ron Adam wrote: LOL, of course it would. I would expect that too after a suitable amount of 'brain washing', oops, I mean training and conditioning. ;-) Trust me, my brain is quite filthy and doesn't wash easily. I do appreciate aesthetics, which is why still

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Michael Hobbs
Ron Adam wrote: Michael Hobbs wrote: Ron Adam wrote: LOL, of course it would. I would expect that too after a suitable amount of 'brain washing', oops, I mean training and conditioning. ;-) Trust me, my brain is quite filthy and doesn't wash easily. I do

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Ben Finney
John Salerno [EMAIL PROTECTED] writes: personally, i don't mind the colon and see no need to lose it, but if we are talking in the realm of aesthetics, it actually seems like it would be cleaner if it weren't there...sure, at first everyone who is used to it might feel like something is

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Robert Kern
Michael Hobbs wrote: In the end, I have to admit that I really couldn't give a flying frog if the colon is there or not. It's just a colon, after all. I *was* hoping that I could convince someone to honestly think about it and consider if the colon is really that noticeable. But so far, the

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Ben Finney
Michael Hobbs [EMAIL PROTECTED] writes: To be clear, this is the actual thrust of my argument. It seems redundant to have *both* line continuations and colons in compound statements. Why are you trying to remove redundancy? The language is designed for communication between people

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Georg Brandl
Michael Hobbs wrote: Georg Brandl wrote: Ron Adam wrote: Michael Hobbs wrote: The same problem that is solved by not having to type parens around the 'if' conditional, a la C and its derivatives. That is, it's unnecessary typing to no good advantage, IMHO. I was coding in Ruby

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Ron Adam
Michael Hobbs wrote: Ron Adam wrote: [EMAIL PROTECTED] wrote: I'm not sure why '\'s are required to do multi-line before the colon. Special cases aren't special enough to break the rules. Georg A bit of a circular answer. Why the rule? - So not

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Michael Hobbs
Robert Kern wrote: Michael Hobbs wrote: In the end, I have to admit that I really couldn't give a flying frog if the colon is there or not. It's just a colon, after all. I *was* hoping that I could convince someone to honestly think about it and consider if the colon is really that

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread John Salerno
Ben Finney wrote: No. The fewer characters, the better is not right. Such absolutes are to be avoided. Sometimes, as in the case of omitting block-enclosing braces, removing characters results in better readability. Other times, as in the case of explicit names for objects, *more*

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Ron Adam
Michael Hobbs wrote: Ron Adam wrote: Michael Hobbs wrote: Ron Adam wrote: LOL, of course it would. I would expect that too after a suitable amount of 'brain washing', oops, I mean training and conditioning. ;-) Trust me, my brain is quite filthy and doesn't wash

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread [EMAIL PROTECTED]
Michael Hobbs wrote: No, old research does is not automatically invalidated, but out-of-context research is. I'm sure there's research somewhere proving that code written in ALL UPPERCASE is preferable, since it makes punched-cards easier to read by humans. Python 1.0 may have been a nice

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Steve Holden
John Salerno wrote: Fredrik Lundh wrote: John Salerno wrote: Anyway, the FAQ answer seems to be a weak argument to me. I agree. I was expecting something more technical to justify the colon, not just that it looks better. yeah, the whole idea of treating programming languages as an

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Steve Holden
Michael Hobbs wrote: Carsten Haese wrote: On Sat, 2006-11-11 at 23:18 -0800, Doug wrote: Michael Hobbs wrote: I think the colon could be omitted from every type of compound statement: 'if', 'for', 'def', 'class', whatever. Am I missing anything? Thanks, - Mike It is a

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Robert Kern
Michael Hobbs wrote: True enough. Although, I have to ask how many times you define a new function only to have Python spit a syntax error out at you saying that you forgot a colon. It happens to me all the time. (Usually after an else) If you'd never notice that the colon was missing if

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread skip
Mike But so far, the only response that I've received is that there's Mike that ABC study somewhere and that settles that. In the absence of a later study that refutes the ABC work, I think it's best left alone. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Michael Hobbs
Robert Kern wrote: Michael Hobbs wrote: True enough. Although, I have to ask how many times you define a new function only to have Python spit a syntax error out at you saying that you forgot a colon. It happens to me all the time. (Usually after an else) If you'd never notice that the

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Dan Lenski
Ben Finney wrote: Readability doesn't vary directly or inversely with the number of characters, even though it is affected when they change. Good point! Perl has more characters than Python, and I find they make it harder to read because they are distracting. Brainf***

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Carl Banks
Steve Holden wrote: In fact most Python doesn't use such constructs, though I'll admit the occasional __init__ is more or less inevitable once you start using the object-oriented features more than casually. Occasional? I don't know about you, but I use __init__ in 99% of the classes I

Re: Py3K idea: why not drop the colon?

2006-11-13 Thread Carl Banks
Ben Finney wrote: Michael Hobbs [EMAIL PROTECTED] writes: To be clear, this is the actual thrust of my argument. It seems redundant to have *both* line continuations and colons in compound statements. Why are you trying to remove redundancy? The language is designed for communication

Re: Py3K idea: why not drop the colon?

2006-11-12 Thread Doug
Michael Hobbs wrote: Can anyone find a flaw with this change in syntax? Instead of dividing a compound statement with a colon, why not divide it on a newline? For example, the colon could be dropped from this statement: if self.hungry: self.eat() to if self.hungry

Re: Py3K idea: why not drop the colon?

2006-11-12 Thread Hendrik van Rooyen
Dan Lenski [EMAIL PROTECTED] wrote: Hendrik van Rooyen wrote: Fredrik Lundh [EMAIL PROTECTED] wrote: 8--- color = blue if color == red or green or yellow: ... print color, is red or green or yellow ... blue is red or

Re: Py3K idea: why not drop the colon?

2006-11-12 Thread Carsten Haese
On Sat, 2006-11-11 at 23:18 -0800, Doug wrote: Michael Hobbs wrote: I think the colon could be omitted from every type of compound statement: 'if', 'for', 'def', 'class', whatever. Am I missing anything? Thanks, - Mike It is a very good idea as the colon is technically redundant (not

Re: Py3K idea: why not drop the colon?

2006-11-11 Thread Antoon Pardon
On 2006-11-11, Steven D'Aprano [EMAIL PROTECTED] wrote: On Fri, 10 Nov 2006 13:16:32 -0600, Michael Hobbs wrote: Yeah, okay, I didn't read through the details of the PEP. I picked a bad example to illustrate a point that is still true. The FAQ also tries to argue that it's a Good Thing that

Re: Py3K idea: why not drop the colon?

2006-11-11 Thread Steven D'Aprano
On Sat, 11 Nov 2006 01:13:03 -0600, Ron Adam wrote: Steven D'Aprano wrote: On Fri, 10 Nov 2006 21:24:50 +0100, Bjoern Schliessmann wrote: Marc 'BlackJack' Rintsch wrote: No it doesn't -- look again at the example given above. It's legal syntax in Python but doesn't have the semantics

Re: Py3K idea: why not drop the colon?

2006-11-11 Thread Ron Adam
Steven D'Aprano wrote: On Sat, 11 Nov 2006 01:13:03 -0600, Ron Adam wrote: Steven D'Aprano wrote: On Fri, 10 Nov 2006 21:24:50 +0100, Bjoern Schliessmann wrote: Marc 'BlackJack' Rintsch wrote: No it doesn't -- look again at the example given above. It's legal syntax in Python but

Re: Py3K idea: why not drop the colon?

2006-11-11 Thread Georg Brandl
Ron Adam wrote: Michael Hobbs wrote: The same problem that is solved by not having to type parens around the 'if' conditional, a la C and its derivatives. That is, it's unnecessary typing to no good advantage, IMHO. I was coding in Ruby for several months and got very comfortable with

Re: Py3K idea: why not drop the colon?

2006-11-11 Thread Ron Adam
Georg Brandl wrote: Ron Adam wrote: Michael Hobbs wrote: The same problem that is solved by not having to type parens around the 'if' conditional, a la C and its derivatives. That is, it's unnecessary typing to no good advantage, IMHO. I was coding in Ruby for several months and got very

Re: Py3K idea: why not drop the colon?

2006-11-11 Thread Georg Brandl
Ron Adam wrote: Georg Brandl wrote: Ron Adam wrote: Michael Hobbs wrote: The same problem that is solved by not having to type parens around the 'if' conditional, a la C and its derivatives. That is, it's unnecessary typing to no good advantage, IMHO. I was coding in Ruby for several

Re: Py3K idea: why not drop the colon?

2006-11-11 Thread Ron Adam
Georg Brandl wrote: Ron Adam wrote: Georg Brandl wrote: Ron Adam wrote: Michael Hobbs wrote: The same problem that is solved by not having to type parens around the 'if' conditional, a la C and its derivatives. That is, it's unnecessary typing to no good advantage, IMHO. I was coding in

Re: Py3K idea: why not drop the colon?

2006-11-11 Thread skip
I'm not sure why '\'s are required to do multi-line before the colon. Special cases aren't special enough to break the rules. Georg A bit of a circular answer. Why the rule? - So not to break the rule? You proposed to allow leaving off line

Re: Py3K idea: why not drop the colon?

2006-11-11 Thread Dan Lenski
Hendrik van Rooyen wrote: Fredrik Lundh [EMAIL PROTECTED] wrote: 8--- color = blue if color == red or green or yellow: ... print color, is red or green or yellow ... blue is red or green or yellow *grin* - this can be construed

Re: Py3K idea: why not drop the colon?

2006-11-11 Thread Ron Adam
[EMAIL PROTECTED] wrote: I'm not sure why '\'s are required to do multi-line before the colon. Special cases aren't special enough to break the rules. Georg A bit of a circular answer. Why the rule? - So not to break the rule? You proposed

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Neil Cerutti
On 2006-11-10, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Thu, 09 Nov 2006 14:44:21 -0600, Tim Chase [EMAIL PROTECTED] declaimed the following in comp.lang.python: A few arbitrary warts per-dictum of BDFL are fine though...it still looks much cleaner compared to PHP Perl ;-) Or

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread skip
Neil The colon's main purpose seems to be to allow one-liners: Neil Easy to parse: if a b: a += 1 Neil Hard to parse if a b a += 1 No, as the note from Tim Peters referenced by Robert Kern pointed out earlier in this thread, the ABC language designers found that indentation-based

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Neil Cerutti
On 2006-11-09, Bjoern Schliessmann [EMAIL PROTECTED] wrote: What about if color == red or blue or green: return 'primary' :) The Inform 6* programming language supports the serial 'or' (and 'and') and looks just like that. The disadvantage is that the usual binary logical operators must

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread skip
Neil The colon's main purpose seems to be to allow one-liners: Neil Easy to parse: if a b: a += 1 Neil Hard to parse if a b a += 1 Skip ... the ABC language designers found that indentation-based block Skip structure by itself wasn't enough to clue new users in about the

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Bjoern Schliessmann
Neil Cerutti wrote: On 2006-11-09, Bjoern Schliessmann if color == red or blue or green: return 'primary' :) The Inform 6* programming language supports the serial 'or' (and 'and') and looks just like that. Python also supports it. The disadvantage is that the usual binary logical

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Robert Kern
[EMAIL PROTECTED] wrote: P.S. I felt I just had to tie this into the thread on profanity somehow. But notice that I didn't mention nazis or Hitler. ;-) You did it just now! -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Tony Nelson
In article [EMAIL PROTECTED], Bjoern Schliessmann [EMAIL PROTECTED] wrote: Michael Hobbs wrote: That is, assume that the expression ends at the colon, not at the newline. That would make this type of statement possible: if color == red or color == blue or color ==

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Michael Hobbs
Ben Finney wrote: Please don't hide your new thread as a reply to an existing, unrelated message. Start a new message if your message isn't actually a reply. My apologies. My email client was apparently hiding some important headers from me. The colon that divides the statement therefore

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Neil Cerutti
On 2006-11-10, Bjoern Schliessmann [EMAIL PROTECTED] wrote: Neil Cerutti wrote: On 2006-11-09, Bjoern Schliessmann if color == red or blue or green: return 'primary' :) The Inform 6* programming language supports the serial 'or' (and 'and') and looks just like that. Python also

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Neil Cerutti
On 2006-11-10, Robert Kern [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: P.S. I felt I just had to tie this into the thread on profanity somehow. But notice that I didn't mention nazis or Hitler. ;-) You did it just now! I hate Godwin's Law Nazis. ;-) -- Neil Cerutti Scouts are

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Bjoern Schliessmann wrote: Neil Cerutti wrote: On 2006-11-09, Bjoern Schliessmann if color == red or blue or green: return 'primary' :) The Inform 6* programming language supports the serial 'or' (and 'and') and looks just like that. Python also supports

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread skip
Robert [EMAIL PROTECTED] wrote: P.S. I felt I just had to tie this into the thread on profanity somehow. But notice that I didn't mention nazis or Hitler. ;-) Robert You did it just now! Hence the smiley. ;-) S -- http://mail.python.org/mailman/listinfo/python-list

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Steve Holden
Michael Hobbs wrote: Ben Finney wrote: [...] A use case. What problem is being solved by introducing this inconsistency? The same problem that is solved by not having to type parens around the 'if' conditional, a la C and its derivatives. That is, it's unnecessary typing to no good

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Steve Holden
Bjoern Schliessmann wrote: Michael Hobbs wrote: That is, assume that the expression ends at the colon, not at the newline. That would make this type of statement possible: if color == red or color == blue or color == green: return 'primary' Right now, such a

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Ron Adam
Michael Hobbs wrote: The same problem that is solved by not having to type parens around the 'if' conditional, a la C and its derivatives. That is, it's unnecessary typing to no good advantage, IMHO. I was coding in Ruby for several months and got very comfortable with just typing the if

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Michael Hobbs
Steve Holden wrote: Michael Hobbs wrote: Ben Finney wrote: [...] A use case. What problem is being solved by introducing this inconsistency? The same problem that is solved by not having to type parens around the 'if' conditional, a la C and its derivatives. That

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread skip
Replying via Steve's not to (I think) a comment from Michael Hobbs (apologies to Steve): The FAQ says that the colon increases readability, but I'm skeptical. The indentation seems to provide more than enough of a visual clue as to where the if conditional ends. I use four-space

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Michael Hobbs
Ron Adam wrote: The faq also pointed out a technical reason for requiring the colon. It makes the underlying parser much easier to write and maintain. This shouldn't be taken to lightly in my opinion, because a simpler easer to maintain and more reliable python parser means development

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Bjoern Schliessmann
Marc 'BlackJack' Rintsch wrote: No it doesn't -- look again at the example given above. It's legal syntax in Python but doesn't have the semantics implied by the example. Sorry, I don't understand -- what is the difference between the example as it is and the implied semantics of it?

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread James Cunningham
On 2006-11-10 15:24:50 -0500, Bjoern Schliessmann [EMAIL PROTECTED] said: Marc 'BlackJack' Rintsch wrote: No it doesn't -- look again at the example given above. It's legal syntax in Python but doesn't have the semantics implied by the example. Sorry, I don't understand -- what is the

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Fredrik Lundh
John Salerno wrote: Anyway, the FAQ answer seems to be a weak argument to me. I agree. I was expecting something more technical to justify the colon, not just that it looks better. yeah, the whole idea of treating programming languages as an interface between people and computers is

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Fredrik Lundh
Bjoern Schliessmann wrote: Marc 'BlackJack' Rintsch wrote: No it doesn't -- look again at the example given above. It's legal syntax in Python but doesn't have the semantics implied by the example. Sorry, I don't understand -- what is the difference between the example as it is and the

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Max Erickson
color='orange' if color=='red' or 'blue' or 'green': print Works? Works? -- http://mail.python.org/mailman/listinfo/python-list

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread James Cunningham
On 2006-11-10 15:47:42 -0500, Max Erickson [EMAIL PROTECTED] said: color='orange' if color=='red' or 'blue' or 'green': print Works? Works? No! No no no. I won't hear of it. Don't you know that with insufficient test cases, everything is right? Sheesh. Best, James --

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Ron Adam
Michael Hobbs wrote: Ron Adam wrote: The faq also pointed out a technical reason for requiring the colon. It makes the underlying parser much easier to write and maintain. This shouldn't be taken to lightly in my opinion, because a simpler easer to maintain and more reliable python

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Steve Holden
James Cunningham wrote: On 2006-11-10 15:24:50 -0500, Bjoern Schliessmann [EMAIL PROTECTED] said: Marc 'BlackJack' Rintsch wrote: No it doesn't -- look again at the example given above. It's legal syntax in Python but doesn't have the semantics implied by the example. Sorry, I don't

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Michael Hobbs
Ron Adam wrote: It is also an outline form that frequently used in written languages. Something python tries to do, is to be readable as if it were written in plain language where it is practical to do so. So the colon/outline form makes a certain sense in that case as well. That

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Bjoern Schliessmann
Fredrik Lundh wrote: color = blue if color == red or green or yellow: ... print color, is red or green or yellow ... blue is red or green or yellow Whoops. Okay. Regards, Björn -- BOFH excuse #303: fractal radiation jamming the backbone --

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Ron Adam
Michael Hobbs wrote: Ron Adam wrote: It is also an outline form that frequently used in written languages. Something python tries to do, is to be readable as if it were written in plain language where it is practical to do so. So the colon/outline form makes a certain sense in that

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Steven D'Aprano
On Fri, 10 Nov 2006 21:24:50 +0100, Bjoern Schliessmann wrote: Marc 'BlackJack' Rintsch wrote: No it doesn't -- look again at the example given above. It's legal syntax in Python but doesn't have the semantics implied by the example. Sorry, I don't understand -- what is the difference

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Steven D'Aprano
On Fri, 10 Nov 2006 10:37:08 -0600, Michael Hobbs wrote: The FAQ says that the colon increases readability, but I'm skeptical. The indentation seems to provide more than enough of a visual clue as to where the if conditional ends. and then in a later post: Like I said in that paragraph,

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Steven D'Aprano
On Fri, 10 Nov 2006 15:18:55 -0600, Michael Hobbs wrote: Ron Adam wrote: It is also an outline form that frequently used in written languages. Something python tries to do, is to be readable as if it were written in plain language where it is practical to do so. So the colon/outline

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Paul Boddie
Ron Adam wrote: PS. Rather than shav of on character her and ther in pythons programing languag, Lets remov all the silent leters from the english languag. That will sav thousands mor kestroks over a few yers. How about changing Python to support keywords and identifiers employing the

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Steven D'Aprano
On Fri, 10 Nov 2006 13:16:32 -0600, Michael Hobbs wrote: Yeah, okay, I didn't read through the details of the PEP. I picked a bad example to illustrate a point that is still true. The FAQ also tries to argue that it's a Good Thing that join() is a string method, not a list method. It also

  1   2   >