On 7/13/06, Jeroen Ruigrok van der Werven <[EMAIL PROTECTED]> wrote:
> Things that struck me as peculiar is the old:
>
> if __name__ == "__main__":
>     whatever()
>
> This is so out of tune with the rest of python it becomes a nuisance.

It is not beautiful but very useful.
In Python 3000 we can replace it with:

@main
def whatever():
    ...

to mark this function as main function if module executed directly.

-- 
bye by Wolfgang
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to