Re: newbie question structure of function

2008-03-13 Thread nodrogbrown
> > > resultname=""" > > > That starts a string literal. > > i am not sure if this is the right way..i used it in case > matchdistance < threshold return False.then the filename will not be > taken from the filenameslist and so returns as an empty string. >a one-tuple why not use None instea

Re: newbie question structure of function

2008-03-13 Thread menosaint
Aaron thanx for the input > > resultname=""" > > That starts a string literal. i am not sure if this is the right way..i used it in case matchdistance < threshold return False.then the filename will not be taken from the filenameslist and so returns as an empty string. > > return (mat

Re: newbie question structure of function

2008-03-13 Thread castironpi
Just some FYI options. >     if not matchfilename: May return positive if you someday return an object that holds a 'not' value. >     resultname=""" That starts a string literal. > if (matchdistance < threshold): Parentheses optional. >     return (matchdistance,resultname) Parentheses opt

newbie question structure of function

2008-03-13 Thread menosaint
hi I am new to python programming..I would like to call a function that returns an integer value and a filename string as a tuple.I coded it like this below...I want to know if this can be coded more compactly and efficiently..(i am from java background and thus code often becomes bulky ..) de