kennethreitz/tablib — Issue #48: Useless use of map in example
Author: mellort
Created: 2012-01-28 03:40:48+00:00
State: open

>>> data = tablib.Dataset(headers=['First Name', 'Last Name', 'Age'])
>>> map(data.append, [('Kenneth', 'Reitz', 22), ('Bessie', 'Monke', 21)])

`map` is used to construct lists ([doc](http://docs.python.org/library/functions.html#map)). You don't want to construct a list here, so it doesn't make sense to use `map`. Further, it's needlessly confusing. A regular Python `for` statement is much more readable, and doesn't have the side-effect of creating a list:

>>> for datum in [('Kenneth', 'Reitz', 22), ('Bessie', 'Monke', 21)]:
>>> data.append(datum)

Apologies for being pedantic, but due to your popularity in the Python community you have a lot of influence on others' coding styles.