string literal or NoneType

2008-03-15 Thread menosaint
hi all i want to check a condition and if true should return a filename string from a list.if the condition is false i am returning a "" (string literal).. retv="" if somecondition: retv=mylist[x] ... return retv The calling function will check the return value and print the filename if i

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

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