In <[EMAIL PROTECTED]>, Wijaya Edward
wrote:

>     if m:
>         print line,
>     else:
>         #print 'SPAM -- %s' % line
> myfile.close()
> 
> […]
>
> Notice that I wanted to comment out the #print line there.
> However I found problem with myfile.close(), with identation error.
> This error doesn't occur when commenting (#) is not in use.
>  
> Why so?  Is there away to do the commenting in correct way
> under this circumstances?

There has to be code in the ``else`` block.  So either comment out the
``else`` line too, or insert a ``pass`` statement.

Ciao,
        Marc 'BlackJack' Rintsch
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to