bundles / astropy latest / astropy / extern / configobj / configobj / ConfigObj / _quote
function
astropy.extern.configobj.configobj:ConfigObj._quote
source: /astropy/extern/configobj/configobj.py :1751
Signature
def _quote ( self , value , multiline = True ) Summary
Return a safely quoted version of a value.
Extended Summary
Raise a ConfigObjError if the value cannot be safely quoted. If multiline is True (default) then use triple quotes if necessary.
Don't quote values that don't need it.
Recursively quote members of a list and return a comma joined list.
Multiline is
Falsefor lists.Obey list syntax for empty and single member lists.
If list_values=False then the value is only quoted if it contains a \n (is multiline) or '#'.
If write_empty_values is set, and the value is an empty string, it won't be quoted.
Aliases
-
astropy.config.configuration.configobj.ConfigObj._quote