extending the break statement

Jeremy Fincher tweedgeezer at hotmail.com
Thu Oct 23 00:43:07 EDT 2003


mis6 at pitt.edu (Michele Simionato) wrote in message news:<2259b0e2.0310220706.142bf8cb at posting.google.com>...
> Is there a way of "ending" a module? I would like something like this:
> 
>   # mod.py
>   print 'something here'
>   end() # some mysterious function
>   print 'you should not get here'
> 
>   # main.py
>   import mod
>   print 'it works'

# mod.py
print 'something here'
'''
print 'you should not get here'
'''

Just use triple-quote strings to "comment it out."

Jeremy




More information about the Python-list mailing list