why pass statement?

John Roth newsgroups at jhrothjr.com
Tue Sep 16 15:44:20 EDT 2003


"M-a-S" <NO-MAIL at hotmail.com> wrote in message
news:iRI9b.12996$x21.4462 at twister.southeast.rr.com...
> Why is there the pass statement? I think, the expression statement would
be enough:
>
> class C:
>     None
>
> while True:
>     None

You don't actally need Pass. A docstring is sufficient:

class C:
    "this is a class"

while True:
    "loop de loop de loop"

John Roth
>
>
>
>
>
>






More information about the Python-list mailing list