On 2016-02-19, Ben Finney wrote:
> So I am sympathetic to Python newcomers recoiling in horror from
> significant whitespace, *before* they try it. And because of that, we
> are burdened with forever needing to deal with that reaction and
> soothing it.
The first time I wrote Python
Ben Finney :
> So I am sympathetic to Python newcomers recoiling in horror from
> significant whitespace, *before* they try it. And because of that, we
> are burdened with forever needing to deal with that reaction and
> soothing it.
I remember being *very* doubtful how the whitespac
comprehending you.
To be fair, there is good reason for the programming (and broader IT)
community to have a heuristic of “significant whitespace is probably
bad”.
The few languages that did this badly (Makefile syntax, some Unix shell
syntax) leave a legacy of countless headaches and you
Steve Holden wrote:
> r0g wrote:
>> David Robinow wrote:
>>> On Sun, Jan 3, 2010 at 10:42 PM, Roy Smith wrote:
In article ,
David Robinow wrote:
> On Sun, Jan 3, 2010 at 8:09 PM, Tim Roberts wrote:
>> More than "not required", it was "not relevant". This led to one of th
r0g wrote:
> David Robinow wrote:
>> On Sun, Jan 3, 2010 at 10:42 PM, Roy Smith wrote:
>>> In article ,
>>> David Robinow wrote:
>>>
On Sun, Jan 3, 2010 at 8:09 PM, Tim Roberts wrote:
> More than "not required", it was "not relevant". This led to one of the
> most infamous program
On Sun, 03 Jan 2010 23:42:44 -0500, David Robinow wrote:
> On Sun, Jan 3, 2010 at 10:42 PM, Roy Smith wrote:
>> In article ,
>> David Robinow wrote:
>>
>>> On Sun, Jan 3, 2010 at 8:09 PM, Tim Roberts wrote:
>>> > More than "not required", it was "not relevant". This led to one of
>>> > the mo
David Robinow wrote:
> On Sun, Jan 3, 2010 at 10:42 PM, Roy Smith wrote:
>> In article ,
>> David Robinow wrote:
>>
>>> On Sun, Jan 3, 2010 at 8:09 PM, Tim Roberts wrote:
More than "not required", it was "not relevant". This led to one of the
most infamous programming blunders in the
On Sun, Jan 3, 2010 at 10:42 PM, Roy Smith wrote:
> In article ,
> David Robinow wrote:
>
>> On Sun, Jan 3, 2010 at 8:09 PM, Tim Roberts wrote:
>> > More than "not required", it was "not relevant". This led to one of the
>> > most infamous programming blunders in the early days of the space pr
In article ,
David Robinow wrote:
> On Sun, Jan 3, 2010 at 8:09 PM, Tim Roberts wrote:
> > More than "not required", it was "not relevant". This led to one of the
> > most infamous programming blunders in the early days of the space program,
> > when one programmer accidentially typed a period
On Sun, Jan 3, 2010 at 8:09 PM, Tim Roberts wrote:
> More than "not required", it was "not relevant". This led to one of the
> most infamous programming blunders in the early days of the space program,
> when one programmer accidentially typed a period instead of a comma
> resulting in the loss o
In article ,
Tim Roberts wrote:
> Roy Smith wrote:
> >
> >2) Whitespace was not required in many places. For example, the following
> >two statements (this will only make sense in a fixed-width font) are
> >identical:
> >
> > DO 10 I = 1, 10
> > DO10I=1,10
>
> More than "not req
Roy Smith wrote:
>
>2) Whitespace was not required in many places. For example, the following
>two statements (this will only make sense in a fixed-width font) are
>identical:
>
> DO 10 I = 1, 10
> DO10I=1,10
More than "not required", it was "not relevant". This led to one of the
On Jan 1, 4:02�pm, Dan Stromberg wrote:
> I put together a page about significant whitespace (and the lack thereof).
The real problem is your use of proportional spaced fonts.
>
> You're invited to check it out:
>
> http://stromberg.dnsalias.org/~dstromberg/significant-white
in column 2-7
> (column 1 was reserved for a comment indicator). This is not quite
> significant whitespace, it's more like significant indentation.
That would also surprise former FORTRAN programmers (who rarely
referred to the language as "Fortran"). A comment was signified b
On Jan 2, 4:19 pm, Emile van Sebille wrote:
> On 1/1/2010 5:05 PM Steven D'Aprano said...
>
> > In Python terms, imagine if we could write
>
> > foriinrange(10):
>
> > instead of the usual
>
> > for i in range(10):
>
> > Since the colon makes it unambiguous that it is some sort of block
On 1/1/2010 5:05 PM Steven D'Aprano said...
In Python terms, imagine if we could write
foriinrange(10):
instead of the usual
for i in range(10):
Since the colon makes it unambiguous that it is some sort of block
construct, and it starts with "for", it must be a for loop. Pretty
horr
On Sat, 02 Jan 2010 10:42:39 +, Duncan Booth wrote:
> Donn wrote:
>
>> On Saturday 02 January 2010 00:02:36 Dan Stromberg wrote:
>>> I put together a page about significant whitespace (and the lack
>>> thereof).
>> The only thing about Python's
Donn wrote:
> On Saturday 02 January 2010 00:02:36 Dan Stromberg wrote:
>> I put together a page about significant whitespace (and the lack
>> thereof).
> The only thing about Python's style that worries me is that it can't
> be compressed like javascript can*, a
On Fri, Jan 1, 2010 at 9:56 PM, Donn wrote:
> On Saturday 02 January 2010 00:02:36 Dan Stromberg wrote:
>> I put together a page about significant whitespace (and the lack thereof).
> The only thing about Python's style that worries me is that it can't be
> compressed
On Saturday 02 January 2010 00:02:36 Dan Stromberg wrote:
> I put together a page about significant whitespace (and the lack thereof).
The only thing about Python's style that worries me is that it can't be
compressed like javascript can*, and perhaps that will prevent it becoming a
rprise the current crop of
> > Java/PHP/Python/Ruby programmers:
> >
> > 1) Line numbers (i.e. the things you could GOTO to) were in column 2-7
> > (column 1 was reserved for a comment indicator). This is not quite
> > significant whitespace, it's more like
Dan Stromberg wrote:
I put together a page about significant whitespace (and the lack thereof).
You're invited to check it out:
http://stromberg.dnsalias.org/~dstromberg/significant-whitespace.html
You might also want to mention that programmers tend to indent anyway
for clarity.
--
On Fri, 01 Jan 2010 14:19:28 -0800, Chris Rebert wrote:
> For those of us who weren't around during the heyday of FORTRAN, can
> anyone describe this apparently much-reviled significant whitespace
> feature that continues to make some programmers unjustly fearful about
>
In article ,
Chris Rebert wrote:
> On Fri, Jan 1, 2010 at 2:02 PM, Dan Stromberg wrote:
> > I put together a page about significant whitespace (and the lack thereof).
> >
> > You're invited to check it out:
> >
> > http://stromberg.dnsalias.org/~dstromber
On Fri, Jan 1, 2010 at 2:02 PM, Dan Stromberg wrote:
> I put together a page about significant whitespace (and the lack thereof).
>
> You're invited to check it out:
>
> http://stromberg.dnsalias.org/~dstromberg/significant-whitespace.html
For those of us who weren't ar
I put together a page about significant whitespace (and the lack thereof).
You're invited to check it out:
http://stromberg.dnsalias.org/~dstromberg/significant-whitespace.html
--
http://mail.python.org/mailman/listinfo/python-list
In message <[EMAIL PROTECTED]>,
Gerhard Fiedler <[EMAIL PROTECTED]> writes
>> http://www.americanscientist.org/template/AssetDetail/assetid/51982
>>
>> The Semicolon Wars
>
>Good reading :) Thanks.
Found something else relevant to this thread. The Pliant language.
Appears to use whitespace inden
Gerhard Fiedler wrote:
> function()
> loop1()
> blah
> blah
>
> loop2()
> blah
>
> loop3()
> blah
> #end loop3()
>
>
Stephen Kellett wrote:
> In message <[EMAIL PROTECTED]>, Carl
> Banks <[EMAIL PROTECTED]> writes
>> Stephen Kellett wrote:
>> I don't really understand how a closing brace helps here. Care to
>> explain why it helps you?
>
>> (Deeply nested long functions are evil anyways. If you have such a
>
On 2006-08-10 06:44:04, Stephen Kellett wrote:
> Just found this on c.l.ruby. Seems kind of relevant.
> http://www.americanscientist.org/template/AssetDetail/assetid/51982
>
> The Semicolon Wars
Good reading :) Thanks.
Gerhard
--
http://mail.python.org/mailman/listinfo/python-list
"Stephen Kellett" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> To answer your first question: In C++/Ruby/Pascal you'd have something
> like this
>
> function()
> {
>loop1()
>{
>blah
>blah
>
>loop2()
>
On 2006-08-10 07:40:01, Stephen Kellett wrote:
> To answer your first question: In C++/Ruby/Pascal you'd have something
> like this
>
> function()
> {
> loop1()
> {
> [...]
> }
> }
> I really dislike that the end of loop2 is implicit rather than
> explicit.
Since in th
On Thu, 10 Aug 2006 04:01:51 -0700
Rob Wolfe <[EMAIL PROTECTED]> wrote:
#> > if x==1:
#> >
#> > the newline is inserted automatically when you type ":"? That's a
#>
#> Exactly.
Really? The newline? I know it *indents* automatically. But it
definitely doesn't insert newline when I try it.
I even
Stephen Kellett wrote:
> I really dislike that the end of loop2 is implicit rather than
> explicit.
So you can't see at a glance how many blocks were closed. That's fair.
Add a little chalk mark to the against column.
> C/C++ have quite a number of horrible styles (K/R being one)
Oddly, I ne
[EMAIL PROTECTED] wrote:
> Carl Banks wrote:
> > Although Python doesn't do this, it is possible to mandate a specific
> > indent (4 spaces, say), or at least a reasonable consistent indent
>
> I like running reindent.py (found in your Python source directory under
> Tools/Scripts) which cleans
Stephen Kellett wrote:
> function()
> loop1()
> blah
> blah
>
> loop2()
> blah
>
> loop3()
> blah
>
> blah3
>
> otherloop()
>
Carl Banks wrote:
> Although Python doesn't do this, it is possible to mandate a specific
> indent (4 spaces, say), or at least a reasonable consistent indent
I like running reindent.py (found in your Python source directory under
Tools/Scripts) which cleans up indentations, trailing whitespace,
Slawomir Nowaczyk wrote:
> On Wed, 09 Aug 2006 07:33:41 -0700
> Rob Wolfe <[EMAIL PROTECTED]> wrote:
>
> #> Slawomir Nowaczyk wrote:
> #>
> #> > Really, typing brace after function/if/etc should add newlines and
> #> > indent code as required -- automatically. Actually, for me, it is even
> #> > *
In message <[EMAIL PROTECTED]>, Carl
Banks <[EMAIL PROTECTED]> writes
>Stephen Kellett wrote:
>I don't really understand how a closing brace helps here. Care to
>explain why it helps you?
>(Deeply nested long functions are evil anyways. If you have such a
I didn't write deeply nested. I wrote m
On Wed, 09 Aug 2006 07:33:41 -0700
Rob Wolfe <[EMAIL PROTECTED]> wrote:
#> Slawomir Nowaczyk wrote:
#>
#> > Really, typing brace after function/if/etc should add newlines and
#> > indent code as required -- automatically. Actually, for me, it is even
#> > *less* typing in C and similar languages.
In message <[EMAIL PROTECTED]>,
Gerhard Fiedler <[EMAIL PROTECTED]> writes
>I mean the code should be written so that as few as possible comments are
>necessary to understand it. I don't mean that additional comments are a bad
>thing.
Agreed. Concise code is always good.
Just found this on c.l.r
In message <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] writes
>No. In that case Python makes it more readily apparent that your code is
>too complex.
If only life and software engineering was that simple. Not every problem
can be reduced to one screenful of code, not in the real world anyway.
Steph
"Dennis Lee Bieber" <[EMAIL PROTECTED]> wrote:
| On 8 Aug 2006 04:59:34 -0700, [EMAIL PROTECTED] declaimed the
| following in comp.lang.python:
|
| >
| > Some of it may be a reaction from "old-timers" who remember FORTRAN,
| > where (if memory serves), code had to start in column 16 and code
| >
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
>
> I forget what COBOL used, but it had a few fields of its own.
Not in fixed columns. Surprisingly, layout in COBOL was more closely
related to Python, in that indentation was significant, but the number of
characters per indent was up to the p
On 2006-08-09 11:10:20, Stephen Kellett wrote:
> If you mean, should code be well written, thought about, well formatted,
> sensible class/variable names, redesigned if you find a better way, sure
> no problem with that.
I mean the code should be written so that as few as possible comments are
Michiel Sikma wrote:
> Op 9-aug-2006, om 16:48 heeft Carl Banks het volgende geschreven:
>
> > Even if this were legal code (it isn't), it's still more transparent
> > than some of the C code I've seen.
> >
> > Carl Banks
>
> Still kind of too bad that means there won't ever be an International
> O
infidel <[EMAIL PROTECTED]> wrote:
> Where are they-who-hate-us-for-our-whitespace? Are "they" really that
> stupid/petty? Are "they" really out there at all? "They" almost sound
> like a mythical caste of tasteless heathens that "we" have invented.
> It just sounds like so much trivial nitpicke
Op 9-aug-2006, om 16:48 heeft Carl Banks het volgende geschreven:
> Even if this were legal code (it isn't), it's still more transparent
> than some of the C code I've seen.
>
>
> Carl Banks
Still kind of too bad that means there won't ever be an International
Obfuscated Python Code Contest.
Pierre Barbier de Reuille wrote:
> Problem being : grouping by indentation do *not* imply good indentation.
By itself, it doesn't. But with grouping by indentation, bad
indentation no longer results from mere carelessness, which is no small
thing.
Although Python doesn't do this, it is possible
Slawomir Nowaczyk wrote:
> Really, typing brace after function/if/etc should add newlines and
> indent code as required -- automatically. Actually, for me, it is even
> *less* typing in C and similar languages... I probably should teach my
> Emacs to automatically add newline after colon in Pytho
Slawomir> #> No. In that case Python makes it more readily apparent
Slawomir> #> that your code is too complex. With C, Java, C++, Perl or
Slawomir> #> FORTRAN you just smush everything over to the left and
Slawomir> #> pretend it's not. ;-)
Slawomir> Well, one space is suff
Stephen Kellett wrote:
> In message <[EMAIL PROTECTED]>,
> "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes
> >of the driving principles behind Python is that, because code will be
> >read more often than written, readability is more important.
>
> In which case, for long functions with multiple leve
On Wed, 09 Aug 2006 09:13:21 -0500
[EMAIL PROTECTED] wrote:
#>
#> >> of the driving principles behind Python is that, because code will be
#> >> read more often than written, readability is more important.
#>
#> Stephen> In which case, for long functions with multiple levels of
#>
On Wed, 09 Aug 2006 05:00:20 -0700
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
#> Slawomir Nowaczyk wrote:
#> >
#> > I must admit I do not get this "indicate intentions twice" argument,
#> > even though I heard it a number of times now... It's not that braces
#> > require more work or more typi
phics
(the team that later became Ultimate Play the Game who wrote for the
Sinclair ZX Spectrum very successfully in the 1980s). A bit of history
for you :-)
Since someone mentioned assemblers and significant whitespace and I'm
rambling about assembly: I don't every remember whitespac
>> of the driving principles behind Python is that, because code will be
>> read more often than written, readability is more important.
Stephen> In which case, for long functions with multiple levels of
Stephen> indentation Python fails compared to languages that use braces
S
In message <[EMAIL PROTECTED]>,
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes
>of the driving principles behind Python is that, because code will be
>read more often than written, readability is more important.
In which case, for long functions with multiple levels of indentation
Python fails c
[EMAIL PROTECTED] wrote:
> Its not the typing, its the fact that when you say the same thing
> twice, there is the potential for them to get out of sync. If the
> method the compiler uses (braces) and the method the human uses
> (indentation) to determine what the code does don't agree, then a
> r
e really do exist, and they
>>>> each believe their preconception -- that significant whitespace is
>>>> intrinsically wrong -- is valid, and automatically makes Python a
>>>> lesser language.
>>> Well, I most certainly disagree with that, of co
Carl Banks wrote:
> Michiel Sikma wrote:
>> Op 8-aug-2006, om 1:49 heeft Ben Finney het volgende geschreven:
>>
>>> As others have pointed out, these people really do exist, and they
>>> each believe their preconception -- that significant whitespace is
>>
Slawomir Nowaczyk wrote:
>
> I must admit I do not get this "indicate intentions twice" argument,
> even though I heard it a number of times now... It's not that braces
> require more work or more typing or something, after all -- at least
> not if one is using a decent editor.
Its not the typing,
On Mon, 07 Aug 2006 16:47:57 -0700
Jason <[EMAIL PROTECTED]> wrote:
#> It is annoying that certain communication channels do not respect
#> white-space. I dislike using braces because I have to indicate my
#> intentions twice: once for the compiler and once for humans.
I must admit I do not get
On 2006-08-08 19:02:27, Stephen Kellett wrote:
> In message <[EMAIL PROTECTED]>,
> Gerhard Fiedler <[EMAIL PROTECTED]> writes
>>conclusion for me: they must not like self-documenting code... :)
>
> Oh dear. So if the code is wrong it is self documenting?
?? I'm not sure you are actually respond
Michiel Sikma wrote:
> Op 8-aug-2006, om 1:49 heeft Ben Finney het volgende geschreven:
>
> > As others have pointed out, these people really do exist, and they
> > each believe their preconception -- that significant whitespace is
> > intrinsically wrong -- is valid,
In message <[EMAIL PROTECTED]>,
Gerhard Fiedler <[EMAIL PROTECTED]> writes
>conclusion for me: they must not like self-documenting code... :)
Oh dear. So if the code is wrong it is self documenting?
Comments document what the code should do.
The code shows what the code actually does.
Also from
On 2006-08-08 12:49:35, Aahz wrote:
>>Where are they-who-hate-us-for-our-whitespace? Are "they" really that
>>stupid/petty? Are "they" really out there at all? "They" almost sound
>>like a mythical caste of tasteless heathens that "we" have invented.
>>It just sounds like so much trivial nitpic
Thomas Guettler wrote:
> I like python, but sometimes i don't like that python allows
> spaces and tabs. It would be easier if you had less choice and
> must use four spaces.
That's the nice thing about Python. It doesn't care about indentation
distance, it just wants "some" and "consistent".
I
In article <[EMAIL PROTECTED]>,
infidel <[EMAIL PROTECTED]> wrote:
>
>Where are they-who-hate-us-for-our-whitespace? Are "they" really that
>stupid/petty? Are "they" really out there at all? "They" almost sound
>like a mythical caste of tasteless heathens that "we" have invented.
>It just sounds
<[EMAIL PROTECTED]> wrote:
> infidel wrote:
> > Where are they-who-hate-us-for-our-whitespace? Are "they" really that
> > stupid/petty? Are "they" really out there at all? "They" almost sound
> > like a mythical caste of tasteless heathens that "we" have invented.
> > It just sounds like so muc
Am Mon, 07 Aug 2006 14:43:04 -0700 schrieb infidel:
> Where are they-who-hate-us-for-our-whitespace? Are "they" really that
> stupid/petty? Are "they" really out there at all? "They" almost sound
> like a mythical caste of tasteless heathens that "we" have invented.
> It just sounds like so muc
> All societies demonise outsiders to some extent. It's an unfortunate
> human (and animal) trait.
Which is why I questioned it.
> So just block your ears when the propaganda vans with the loud-speakers
> on top drive past your dwelling :-)
Funny how using python makes me feel like a member of s
istory makes the irrational fear
of significant whitespace seem a little less irrational.
--
http://mail.python.org/mailman/listinfo/python-list
infidel wrote:
> Where are they-who-hate-us-for-our-whitespace? Are "they" really that
> stupid/petty? Are "they" really out there at all? "They" almost sound
> like a mythical caste of tasteless heathens that "we" have invented.
> It just sounds like so much trivial nitpickery that it's hard to
infidel wrote:
> Where are they-who-hate-us-for-our-whitespace?
You may find some on comp.lang.ruby...
--
http://mail.python.org/mailman/listinfo/python-list
Op 8-aug-2006, om 1:49 heeft Ben Finney het volgende geschreven:
> As others have pointed out, these people really do exist, and they
> each believe their preconception -- that significant whitespace is
> intrinsically wrong -- is valid, and automatically makes Python a
> lesser lan
I've never had either problem.
>
I have many times found that in moving a multi-screen block of code
from one place to another (where the indent is less or more) then I
have trouble re-indenting the code. That is not to say that I don't in
the end prefer the significant whitespace,
Jason wrote:
> But newsgroup managers are certainly an issue.
> For comment thingies online, the preformat tag is your friend, too.
Time ago I used to add a | or something similar at the beginning of
lines, to avoid the leading whitespace stripping done by Google Groups.
Other (silly) solutions ar
ves a curly brace, the same problem can occur.
>
> I like significant whitespace, but a forum, newsgroup manager (like
> Google Groups in the beginning), email management program, blog comment
> system, etc, may strip leading whitespace, and it usually doesn't
> "move"
"infidel" <[EMAIL PROTECTED]> writes:
> It just sounds like so much trivial nitpickery that it's hard to
> believe it's as common as we've come to believe.
As others have pointed out, these people really do exist, and they
each believe their preconcept
cur.
I like significant whitespace, but a forum, newsgroup manager (like
Google Groups in the beginning), email management program, blog comment
system, etc, may strip leading whitespace, and it usually doesn't
"move" braces. A language (like Python) doesn't exist alone in vacuum,
it exis
it's as common as we've come to believe.
So just block your ears when the propaganda vans with the loud-speakers
on top drive past your dwelling :-)
...
However, meaninglessly significant whitespace at the *other* end of a
line can
infidel wrote:
> Where are they-who-hate-us-for-our-whitespace? Are "they" really that
> stupid/petty? Are "they" really out there at all? "They" almost sound
> like a mythical caste of tasteless heathens that "we" have invented.
> It just sounds like so much trivial nitpickery that it's hard to
infidel wrote:
> Where are they-who-hate-us-for-our-whitespace? Are "they" really that
> stupid/petty? Are "they" really out there at all? "They" almost sound
> like a mythical caste of tasteless heathens that "we" have invented.
> It just sounds like so much trivial nitpickery that it's hard to
Where are they-who-hate-us-for-our-whitespace? Are "they" really that
stupid/petty? Are "they" really out there at all? "They" almost sound
like a mythical caste of tasteless heathens that "we" have invented.
It just sounds like so much trivial nitpickery that it's hard to
believe it's as common
On Wed, 26 Jan 2005 11:31:18 +0800, mep wrote:
> Hi,all
> Is there anybody trying to release a modification version to current
> python source code with no significant whitespace, say replacing whitespace
> by {}
> like C or java. I do *NOT* mean whitespace is good or bad, just
Just though I'd point out that Logix *does* use whitespace for
delimiting blocks. Or rather, it can use whitespace, and the languages
that come as standard do.
With Logix you could quite easily make a version of Python with, e.g.,
braces instead of whitespace for delimiting blocks. That's probably
On Wed, 26 Jan 2005 11:31:18 +0800, mep <[EMAIL PROTECTED]> wrote:
> Hi,all
> Is there anybody trying to release a modification version to current
> python source code with no significant whitespace, say replacing whitespace
> by {}
> like C or java. I do *NOT* mean whit
Hi,all
Is there anybody trying to release a modification version to current
python source code with no significant whitespace, say replacing whitespace
by {}
like C or java. I do *NOT* mean whitespace is good or bad, just
want to know.
Best Regards,
mep
--
http://mail.python.org/mailman
88 matches
Mail list logo