What is description attribute in python?

Steven D'Aprano steve+comp.lang.python at pearwood.info
Sun Nov 9 11:59:08 CET 2014


satishmlmlml at gmail.com wrote:

> What does description attribute in the following code mean?
> 
> curs.execute('select * from people')
> colnames = [desc[0] for desc in curs.description]

It's an attribute called "description". You would need to read the
documentation for curs to know what it does.

What is curs? Where does it come from?


-- 
Steven




More information about the Python-list mailing list