Problem with filter()

2007-04-03 Thread Birone Lynch
"""Sorry folks my mistake def is_dev should be: def is_Dev(stringy): stringx = stringy.split('-') if stringx[0] == '': if stringx[1] == r'win32': if stringx[2] == r'app': if stringx[4] == r'dev.tar.gz': return 1 But now the results of the filter is an empty list

Retrieve an item from a dictionary using an arbitrary object as the key

2007-04-03 Thread Birone Lynch
> getPerson(19) should return me the Person with name "bob" and age > 99. I am thinking there is some method that is used by the dictionary > to know if the key exists, just not sure which. Were you thinking of get: a.get(k[, x]) returns a[k] if k in a, else x But do you want to lookup