by ctrlc-root · 9y ago · 0 comments
Not necessarily. I find it helps readability to do this:
def prunde_indices(indices, cutoff):
def match_old_index(index):
return index.timestamp < cutoff
old_indices = filter(match_old_index, indices)
# ... do things with old_indices
as opposed to using an anonymous lambda. That doesn't mean I have to reuse it outside of this function.No comments yet.