Request for comments: Search and replace script

Sean 'Shaleh' Perry shalehperry at attbi.com
Sat Feb 23 00:20:43 CET 2002


> 
> I would be very appreciative of any comments or patches to it.
> Particularly, I am interested in:
> 
> - Things that could make it faster
> - Things to make it more 'pythonic'
> - Bugs or logic errors
> 

tabs, ick, tabs .....

please try to keep a line down to 78 chars

exiting in a constructor is not nice, especially when you are planning on having
  others use your code.  Just throw an exception.

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

globals are also icky

why is usage a) a list (it could have been a tuple) and b) defined at all.  You
  could just read __doc__ and make it the file's doc string




More information about the Python-list mailing list