Usage of main()

Jan Kaliszewski zuo at
Fri Sep 4 12:56:11 CEST 2009

04-09-2009 o 08:37:43 r <rt8396 at> wrote:

> Why use a nested function when you already *in* main?

I understand you name global scope as 'main'. But (independently
of using the __main__ idiom and so on) it is still good idea not to
place to much code in the global scope but to place your app-logic
code in functions -- because, as we noted:

* in practice it is considerably faster,

* it helps you with using functions & class browsers.


Jan Kaliszewski (zuo) <zuo at>

More information about the Python-list mailing list