en la misma linea

Heiko Wundram modelnine at bit-bukket.org
Thu Jan 26 15:20:34 CET 2006


Sebastian Bassi wrote:
> Por ejemplo:
> if name != 'comic': return
> Hay un return despues de los dos puntos, no se que significa.

I can't write spanish, but nevertheless maybe an english answer is of help.
Yes, it's allowed to write that, and it is the same as:

if name != 'comic':
    return

You are only allowed to write one statement behind a colon, though (except
with a little more hackery using semicolons, but forget that).

You should read up on the Python grammar...

--- Heiko.



More information about the Python-list mailing list