alternatives to making blocks like { } or other ??

Larry Bates lbates at swamisoft.com
Tue May 18 16:03:38 EDT 2004


Blocks in Python are defined not with {} but rather
with indention.  You indent to start a block and
stop indenting when you wish to end it.  Seems odd
at first, but turns out to be excellent way to
handle blocks (and to properly format you code).

HTH, Larry Bates

"CYBER" <usenet at zly_adres.com> wrote in message
news:c8do0u$9fb$1 at news.atman.pl...
> Hello
>
> Is there any other way under python to create blocks ??
>
> instead of
>
> def sth(x):
> return x
>
>
>
> could i use something else like
>
> def sth(x):
> {
> return x
> }
>
>
> ???





More information about the Python-list mailing list