On Sep 4, 5:56 am, "Jan Kaliszewski" <z...@chopin.edu.pl> wrote: > 04-09-2009 o 08:37:43 r <rt8...@gmail.com> 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.
Ah yes, thanks Jan!. And the others mentioning of "side effects" from imports makes a lot of sense too. -- http://mail.python.org/mailman/listinfo/python-list