Reduce need of backslash

Nicolas Fleury nid_oizo at yahoo.com_remove_the_
Fri Sep 26 13:34:22 EDT 2003


Peter Hansen wrote:
> What should Python do in the following case?
> 
>    a = 5 +
>    someFunc(a)
> 
> Okay, you want it to quietly add 5 and the result of someFunc() together and 
> assign to "a".  What if I told you that I actually had intended to add 5
> plus "b" and assign to a, then call someFunc() and discard the return value.
> 
> You've just turned a nice clean error message from the compiler into a 
> silent and possibly deadly bug.

What if the second line would be indented?  Indentation is already used 
to determine blocks, why not instructions?  For example, the following 
is not error-prone at all:

a = 5 +
     someFunc()

Doesn't it stay with python minimalistic philosophy?

Regards,

Nicolas





More information about the Python-list mailing list