Another salvo in the indentation war? I hope not.

Philip 'Yes, that's my address' Newton nospam.newton at gmx.li
Mon May 29 01:31:40 EDT 2000


On 28 May 2000 21:26:24 GMT, m.faassen at vet.uu.nl (Martijn Faassen)
wrote:

> Philip 'Yes, that's my address' Newton <nospam.newton at gmx.li> wrote:
> [snip]
> > Try feeding this to python, then:
> 
> > if 1 == 1:
> > print "This won't work"
> 
> > You'll get a SyntaxError if somebody removes all leading indentation.
> 
> If you feed this:
> 
> if (1 == 1) {
>   printf("This won't work.\n");
> }
> 
> To C you'll get compiler errors as well if somebody removes all the '}'s. :)
> 
> If-malicious-somebody's-start-removing-stuff-all-code-is-lost-ly yours,

However, removing indentation is more common than removing random
characters such as '{' or '}' (or, with Pascal, 'BEGIN'), wouldn't you
agree? For example, if someone writes HTML without remember that two or
more spaces get treated as one?

We're talking about what happens in real life. Indentation is more often
smashed than characters are lost.

Cheers,
Philip
-- 
Philip Newton <nospam.newton at gmx.li>
If you're not part of the solution, you're part of the precipitate.



More information about the Python-list mailing list