Re: Indentation/whitespace

2006-01-17 Thread Dave Hansen
On 16 Jan 2006 20:41:24 -0800 in comp.lang.python, thakadu [EMAIL PROTECTED] wrote: Yes, thats what you have to do. And that was my original point, you cannot just paste and go, you have to first reformat. My heart bleeds. Regards, -=Dave -- Change is

Re: Indentation/whitespace

2006-01-16 Thread thakadu
It just has to be consistent within a *single* block. Correct, and therein lies the problem I am describing. If someone has used two spaces and you paste into the SAME block where you are using four spaces you will break your code. -- http://mail.python.org/mailman/listinfo/python-list

Re: Indentation/whitespace

2006-01-16 Thread Diez B. Roggisch
thakadu wrote: It just has to be consistent within a *single* block. Correct, and therein lies the problem I am describing. If someone has used two spaces and you paste into the SAME block where you are using four spaces you will break your code. And then you invoke your in/dedent block

Re: Indentation/whitespace

2006-01-16 Thread thakadu
Yes, thats what you have to do. And that was my original point, you cannot just paste and go, you have to first reformat. -- http://mail.python.org/mailman/listinfo/python-list

Re: Indentation/whitespace

2006-01-14 Thread Jon Perez
Joe wrote: As for me, I'm not suggesting that braces are better than indentation. In fact, requiring indentation is a good idea, and I agree that braces can be quite ugly. It is the lack of visible block closing when there's more than one level that I dislike. ... I'm talking about double

Re: Indentation/whitespace

2006-01-12 Thread Dave Hansen
On Thu, 12 Jan 2006 11:56:05 +0800 in comp.lang.python, Jon Perez [EMAIL PROTECTED] wrote: [...] Although the below does work, I believe: Verified example: def check_indent(n): if n==4: print You like four spaces elif n==3: print I like three

Re: Indentation/whitespace

2006-01-11 Thread Jon Perez
Joe wrote: Is Python going to support s syntax the does not use it's infamous whitespace rules? I recall reading that Python might include such a feature. Or, maybe just a brace-to-indentation preprocessor would be sufficient. Nope never. Because that would destroy one of the most important

Re: Indentation/whitespace

2006-01-11 Thread Jon Perez
Ilias Lazaridis wrote: Is Python going to support s syntax the does not use it's infamous whitespace rules? Of course. I estimate it will take around 1 to 2 years from now, until this whitespace-concept will become optionally. Backwards-compatibility will be kept, thus those who

Re: Indentation/whitespace

2006-01-11 Thread Jon Perez
thakadu wrote: While I have no doubt that there are lousy browsers out there, the problem is not only with browsers, but also I agree with you its not Python's fault. The issue is that the code I am pasting may have used a DIFFERENT indentation scheme, so lets say I used four spaces and the

Re: Indentation/whitespace

2005-12-26 Thread jussij
i think you can't call an editor python capable unless it shows you clearly hard (yuck)or soft tabs like View / Show Invisibles in textmate, View / view whitespace in komodo. Zeus for Windows has this View / View whitespace feature: http://www.zeusedit.com Note: Zeus is shareware (45

Re: Indentation/whitespace

2005-12-26 Thread Robert Hicks
No, it is that simple. You don't want it to be is all. Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Indentation/whitespace

2005-12-26 Thread James Tanis
On 26 Dec 2005 04:10:11 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: i think you can't call an editor python capable unless it shows you clearly hard (yuck)or soft tabs like View / Show Invisibles in textmate, View / view whitespace in komodo. Zeus for Windows has this View / View

Re: Indentation/whitespace

2005-12-25 Thread Paul McGuire
Lee Harr [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 2005-12-23, Gary Herron [EMAIL PROTECTED] wrote: You've got the visible/invisible aspect of things *exactly* backwards. The point on a line of text where things change from white space to non-white space is *highly*

Re: Indentation/whitespace

2005-12-25 Thread Ilias Lazaridis
Larry Bates wrote: Joe wrote: Is Python going to support s syntax the does not use it's infamous whitespace rules? Of course. I estimate it will take around 1 to 2 years from now, until this whitespace-concept will become optionally. Backwards-compatibility will be kept, thus those who

Re: Indentation/whitespace

2005-12-25 Thread Robert Hicks
I disagree...I don't think the whitespace rule will ever be optional. Why would it be so? If someone doesn't like it...choose another language. It is that simple really. Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Indentation/whitespace

2005-12-25 Thread Ilias Lazaridis
Robert Hicks wrote: I disagree...I don't think the whitespace rule will ever be optional. Why would it be so? If someone doesn't like it...choose another language. It is that simple really. Robert It's not that simple. But let's simply await. We will know in 2 years. -

Re: Indentation/whitespace

2005-12-24 Thread Steve Holden
thakadu wrote: I consider myself a fairly experienced Python coder and although I am not uncomfortable with significant whitespace there are a few places where I do find it annoying and I wouldnt mind an alternate block delimitation syntax. I would prefer something like the ruby end though

Re: Indentation/whitespace

2005-12-24 Thread Björn Lindström
thakadu [EMAIL PROTECTED] writes: I consider myself a fairly experienced Python coder and although I am not uncomfortable with significant whitespace there are a few places where I do find it annoying and I wouldnt mind an alternate block delimitation syntax. The problem with that is that a

Re: Indentation/whitespace

2005-12-24 Thread Steven D'Aprano
On Fri, 23 Dec 2005 15:31:55 -0800, thakadu wrote: I consider myself a fairly experienced Python coder and although I am not uncomfortable with significant whitespace there are a few places where I do find it annoying and I wouldnt mind an alternate block delimitation syntax. I would prefer

Re: Indentation/whitespace

2005-12-24 Thread thakadu
That's hardly Python's fault. That's a problem with lousy browsers, editors etc. which add word-wrapping or remove whitespace. Complain to the browser developers. While I have no doubt that there are lousy browsers out there, the problem is not only with browsers, but also I agree with you its

Re: Indentation/whitespace

2005-12-24 Thread Alex Martelli
James Tanis [EMAIL PROTECTED] wrote: ... syntax. Honestly I wonder how so many coders actually came to be interested in the field -- one that pretty much thrives in part on its neverending ability to vary, grow, and change -- if something so small can warrant so much attention. An

Re: Indentation/whitespace

2005-12-24 Thread Lee Harr
On 2005-12-23, Gary Herron [EMAIL PROTECTED] wrote: You've got the visible/invisible aspect of things *exactly* backwards. The point on a line of text where things change from white space to non-white space is *highly* visible. The several pixels that represent a { or } are nearly

Re: Indentation/whitespace

2005-12-24 Thread André
Lee Harr wrote: On 2005-12-23, Gary Herron [EMAIL PROTECTED] wrote: You've got the visible/invisible aspect of things *exactly* backwards. The point on a line of text where things change from white space to non-white space is *highly* visible. The several pixels that represent a {

Re: Indentation/whitespace

2005-12-24 Thread gene tani
Lee Harr wrote: On 2005-12-23, Gary Herron [EMAIL PROTECTED] wrote: You've got the visible/invisible aspect of things *exactly* backwards. The point on a line of text where things change from white space to non-white space is *highly* visible. The several pixels that represent a {

Re: Indentation/whitespace

2005-12-24 Thread Joe
My original post was based on reading on Pythons developer list that it was seriously considering some alternate grouping scheme, just because so many people keep asking. But, it seems that never happened. As for me, I'm not suggesting that braces are better than indentation. In fact, requiring

Re: Indentation/whitespace

2005-12-24 Thread James Tanis
On 24 Dec 2005 18:36:32 -0800, Joe [EMAIL PROTECTED] wrote: My original post was based on reading on Pythons developer list that it was seriously considering some alternate grouping scheme, just because so many people keep asking. But, it seems that never happened. As for me, I'm not

Indentation/whitespace

2005-12-23 Thread Joe
Is Python going to support s syntax the does not use it's infamous whitespace rules? I recall reading that Python might include such a feature. Or, maybe just a brace-to-indentation preprocessor would be sufficient. Many people think Python's syntax makes sense. There are strong feelings both

Re: Indentation/whitespace

2005-12-23 Thread Larry Bates
Joe wrote: Is Python going to support s syntax the does not use it's infamous whitespace rules? I recall reading that Python might include such a feature. Or, maybe just a brace-to-indentation preprocessor would be sufficient. Many people think Python's syntax makes sense. There are strong

Re: Indentation/whitespace

2005-12-23 Thread Alex Martelli
Joe [EMAIL PROTECTED] wrote: Is Python going to support s syntax the does not use it's infamous whitespace rules? No, never (even apart from the its vs it's issue here...;-). I recall reading that Python might include such a feature. And I recall reading that Elvis is still alive and was

Re: Indentation/whitespace

2005-12-23 Thread Dave Benjamin
Alex Martelli wrote: The main reason I suggest a general-purpose mechanism for the hooking-up of the preprocessor is that such a mechanism might stand a chance to be accepted (via the usual PEP procedure), as long as other interesting use cases can be found; I suspect that if the only use case

Re: Indentation/whitespace

2005-12-23 Thread Thomas Bartkus
Joe [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is Python going to support s syntax the does not use it's infamous whitespace rules? I recall reading that Python might include such a feature. Or, maybe just a brace-to-indentation preprocessor would be sufficient. Many people

Re: Indentation/whitespace

2005-12-23 Thread Terry Hancock
On Fri, 23 Dec 2005 11:51:23 -0700 Dave Benjamin [EMAIL PROTECTED] wrote: +1 on the preprocessor idea, especially if it would allow us to hook in at the AST level as well. (No comment on the curlies. ;) Only +0 on it myself, but I do know of a use-case -- certain types of web-templating

Re: Indentation/whitespace

2005-12-23 Thread BartlebyScrivener
What's needed is STRICTER whitespace enforcement, especially on April Fools Day. Some call it whitespace fascism. http://www.artima.com/weblogs/viewpost.jsp?thread=101968 rpd -- http://mail.python.org/mailman/listinfo/python-list

Re: Indentation/whitespace

2005-12-23 Thread James Tanis
On 23 Dec 2005 10:01:37 -0800, Joe [EMAIL PROTECTED] wrote: It just seems that Python developers think the whitespace thing is only an issue for newbies. I think that many experienced users don't learn to like it, but instead just learn to live with it. I disagree, I don't think you can be an

Re: Indentation/whitespace

2005-12-23 Thread thakadu
It is not really unique to Python as I have pointed out on this or other forums before. The Occam (OCCAM?) language also uses significant whitespace in much the same way as Python and there may also be others. -- http://mail.python.org/mailman/listinfo/python-list

Re: Indentation/whitespace

2005-12-23 Thread rbt
BartlebyScrivener wrote: What's needed is STRICTER whitespace enforcement, especially on April Fools Day. Some call it whitespace fascism. http://www.artima.com/weblogs/viewpost.jsp?thread=101968 I've only been coding Python for about 3 years now. C is the only other language I'm

Re: Indentation/whitespace

2005-12-23 Thread thakadu
I consider myself a fairly experienced Python coder and although I am not uncomfortable with significant whitespace there are a few places where I do find it annoying and I wouldnt mind an alternate block delimitation syntax. I would prefer something like the ruby end though rather than '{' and

Re: Indentation/whitespace

2005-12-23 Thread Gary Herron
Joe wrote: Is Python going to support s syntax the does not use it's infamous whitespace rules? I recall reading that Python might include such a feature. Or, maybe just a brace-to-indentation preprocessor would be sufficient. Only over our dead bodies! (our = the large and always growing

Re: Indentation/whitespace

2005-12-23 Thread Gary Herron
rbt wrote: BartlebyScrivener wrote: What's needed is STRICTER whitespace enforcement, especially on April Fools Day. Some call it whitespace fascism. http://www.artima.com/weblogs/viewpost.jsp?thread=101968 I've only been coding Python for about 3 years now. C is the only other

Re: Indentation/whitespace

2005-12-23 Thread rbt
Gary Herron wrote: rbt wrote: BartlebyScrivener wrote: What's needed is STRICTER whitespace enforcement, especially on April Fools Day. Some call it whitespace fascism. http://www.artima.com/weblogs/viewpost.jsp?thread=101968 I've only been coding Python for about 3 years now. C

Re: Indentation/whitespace

2005-12-23 Thread BartlebyScrivener
The PEP is not a joke. It's a sensible set of guidelines. The blog post advocating enforcement is, shall we say, a sportive modest proposal? rpd www.dooling.com There is no human problem which could not be solved if people would simply do as I advise.--Gore Vidal --

Re: Indentation/whitespace

2005-12-23 Thread Steven D'Aprano
On Fri, 23 Dec 2005 15:22:39 -0800, thakadu wrote: It is not really unique to Python as I have pointed out on this or other forums before. The Occam (OCCAM?) language also uses significant whitespace in much the same way as Python and there may also be others. Python doesn't have any more

Re: Indentation/whitespace

2005-12-23 Thread Alex Martelli
thakadu [EMAIL PROTECTED] wrote: It is not really unique to Python as I have pointed out on this or other forums before. The Occam (OCCAM?) language also uses significant whitespace in much the same way as Python and there may also be others. Haskell. Rules not identical to Python (they have

Re: Indentation/whitespace

2005-12-23 Thread James Tanis
On 23 Dec 2005 15:22:39 -0800, thakadu [EMAIL PROTECTED] wrote: It is not really unique to Python as I have pointed out on this or other forums before. The Occam (OCCAM?) language also uses significant whitespace in much the same way as Python and there may also be others. Your right of

Re: Indentation/whitespace

2005-12-23 Thread bonono
James Tanis wrote: Honestly I wonder how so many coders actually came to be interested in the field -- one that pretty much thrives in part on its neverending ability to vary, grow, and change -- if something so small can warrant so much attention. That is what a cafe type newsgroup is for,