Bring value from walk()

Milos Prudek prudek at nembv.cz
Fri Feb 25 08:14:39 EST 2000


> In Estimatespace you should initialize Total with zero,
> so python knows the value the first time you add Fs to it.
> And then return Total.

If I initialize Total in Estimatespace, it will be initialized each time
walk is executed. And single walk() line actually means that
Estimatespace is called many times (as many as there are subdirs within
RootDir), therefore Total will be zero.

--
Milos Prudek



More information about the Python-list mailing list