Compare source code
D'Arcy J.M. Cain
darcy at druid.net
Tue Nov 2 05:40:31 CET 2010
On 02 Nov 2010 04:16:28 GMT
Seebs <usenet-nospam at seebs.net> wrote:
> But there's no *reason* to do that, while there are many common daily
> events which result in whitespace changes. e.g., any email sent
> to my work account is being magically transformed into HTML (no one
> knows why) on the server, so I can't get correct indentation except
> in attachments. Many editors helpfully convert spaces to tabs
> by default some or all of the time. And so on.
You have problems. Indentation as syntax isn't one of them. "No one
knows why" email is being "magically" transformed? Your editor has a
mind of its own? Yikes!
> I've lost more time to indentation issues in Python in a month than
> I've lost to mismatches between indentation and flow in C in twenty
Your experience is 180 from mine.
> years. In theory, it sounds like it would help to eliminate the
> ambiguity. In practice, eliminating the question of whether code
> was intended to follow explicit flow rather than indentation just
> means that when there's a mistake you don't even get a warning that
> someone was confused.
> At least in C, if I see:
> if (foo)
> I *know* that something is wrong.
Does it look right? With Python looking right and being right are the
same thing. Once I realized that indentation should only be done using
spaces in Python I never had a problem. I certainly had problems with
C when the code looked right. Sometimes you can't even see the problem
because it's hidden in a badly defined macro.
D'Arcy J.M. Cain <darcy at druid.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
More information about the Python-list