{ } Raw JSON

bundles / astropy latest / astropy / extern / configobj / configobj / Section / as_list

function

astropy.extern.configobj.configobj:Section.as_list

source: /astropy/extern/configobj/configobj.py :1014

Signature

def   as_list ( self key )

Summary

A convenience method which fetches the specified value, guaranteeing that it is a list.

Extended Summary

>>> a = ConfigObj()
>>> a['a'] = 1
>>> a.as_list('a')
[1]
>>> a['a'] = (1,)
>>> a.as_list('a')
[1]
>>> a['a'] = [1]
>>> a.as_list('a')
[1]

Aliases

  • astropy.config.configuration.configobj.Section.as_list