Re: Making code more efficient and effective

2008-06-26 Thread cokofreedom
On Jun 26, 5:42 pm, [EMAIL PROTECTED] wrote: > Cédric Lucantis: > > > PAT = re.compile('^[ ]*(public|protected|private)[ ]+([a-zA-Z0-9_]+) > > [ ]+([a-zA-Z0-9_]+)[ ]+\((.*)\).*$') > > ... > > It might be hard to read but will avoid a lot of obscure parsing code. > > You can use the VERBOSE mode, to

Re: Making code more efficient and effective

2008-06-26 Thread bearophileHUGS
Cédric Lucantis: > PAT = re.compile('^[ ]*(public|protected|private)[ ]+([a-zA-Z0-9_]+) > [ ]+([a-zA-Z0-9_]+)[ ]+\((.*)\).*$') > ... > It might be hard to read but will avoid a lot of obscure parsing code. You can use the VERBOSE mode, to add comments and split that RE into some lines. I think th

Re: Making code more efficient and effective

2008-06-26 Thread Cédric Lucantis
Le Thursday 26 June 2008 14:11:35 [EMAIL PROTECTED], vous avez écrit : > I've written up a little piece of code that isn't that foolproof to > scan through a file (java presently) to find functions and then look > for them throughout the document and output the name of the function, > followed by h