Request for comments: Search and replace script

Sean 'Shaleh' Perry shalehperry at attbi.com
Fri Feb 22 22:17:44 EST 2002


> 
>  > check() makes some of the same checks over and over, perhaps you 
> should look at
>  > the code's flow here and see if it can be done differently
> 
> I am not sure what you mean here.  What I tried to do was to define each 
> separate check (binary, openable, etc) in its own function and then have 
> one function that would call them all in the correct order.  Is this not 
> the best way to do it?
> 

you check isDirectory(filename) 3 times in check().  The first time you return
so the others can not possibly be true.





More information about the Python-list mailing list