First python program, syntax error in while loop

rusi rustompmody at gmail.com
Mon May 6 09:36:31 EDT 2013


On May 6, 6:08 pm, Roy Smith <r... at panix.com> wrote:

> BTW, in C, I used to write:
>
> return (foo)
>
> for years until somebody pointed out to me that
>
> return foo
>
> works.  I just assumed that if I had to write:
>
> if (foo)
> while (foo)
> for (foo; bar; baz)
>
> then
>
> return (foo)
>
> made sense too.

I guess its because K&R always show their examples with
return (expr);
and so we all assume its the propah way



More information about the Python-list mailing list