dynamic if statement
Tim Chase
python.list at tim.thechases.com
Tue Jun 18 12:12:04 EDT 2013
On 2013-06-18 16:27, Mark Lawrence wrote:
> On 18/06/2013 15:56, Tim Chase wrote:
> > name_index_map = dict(
> > (info[0], i)
> > for info, i in enumerate(cursor.description)
>
> Looks like this should be :-
> for i, info in enumerate(cursor.description)
Doh, indeed, you're correct. As forewarned though, it *was*
completely untested, so anything remotely approaching working code is
merely a tribute to how easy it is to write Python that actually runs.
:-)
-tkc
More information about the Python-list
mailing list