On Tue, 24 Jul 2007 02:26:15 -0700, NetHead wrote: > The code below is WRONG, but hopefully illustrates what I am trying to > achieve. > > Any suggestions how to code this is an efficient and maintainable (and > correct) manner? > > […] > for i in wildcards: > for j in i: > try: > j = self.replaceFieldsAndIndices(j, rcn, rcu, > rcp, indices) > except: > # Ignore errors if condition has no format. > pass
Maybe you shouldn't silence all exceptions with a bare except here. This swallows any errors in `replaceFieldsAndIndices()`. Maybe some of them are not the exception you expect, but real errors in your program!? Ciao, Marc 'BlackJack' Rintscj -- http://mail.python.org/mailman/listinfo/python-list