oleiade/stamp — Issue #14: Simplify file manipulation in Stamper.apply_license
Author: oleiade
Created: 2011-11-29 16:27:43+00:00
State: open
Labels: major

Today, files are listed using a tuple containing file extension and file path. This is really not easy to use. Problem is we need to have these informations stored, but the file descriptor buffering system would hardly know how to use it in this state.

So, either we store them not in a tuple, but a dict (which sounds to me like heresy (dict are hash tables which are really performant when storing mass datas)). Or, create a util to be able to create a list from a given index of a tuples list, like :
slice_tuples_list([(1, 2, 3), (4,5,6)], 0) would return [1, 4]
or
slice_tuples_list([('abc', 'def'), ('ghi', 'jkl')], 1) would return ['def', 'jkl']

I assume there must be a documented way to do this.