function stringlengths 11 56k | repo_name stringlengths 5 60 | features list |
|---|---|---|
def __init__(
self,
plotly_name="separatethousands",
parent_name="scattermapbox.marker.colorbar",
**kwargs | plotly/plotly.py | [
13052,
2308,
13052,
1319,
1385013188
] |
def __init__(self, msg=''):
self.message = msg
Exception.__init__(self, msg) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, section):
Error.__init__(self, 'No section: %r' % (section,))
self.section = section
self.args = (section, ) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, section, source=None, lineno=None):
msg = [repr(section), " already exists"]
if source is not None:
message = ["While reading from ", repr(source)]
if lineno is not None:
message.append(" [line {0:2d}]".format(lineno))
message.append... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, section, option, source=None, lineno=None):
msg = [repr(option), " in section ", repr(section),
" already exists"]
if source is not None:
message = ["While reading from ", repr(source)]
if lineno is not None:
message.append(" [lin... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, option, section):
Error.__init__(self, "No option %r in section: %r" %
(option, section))
self.option = option
self.section = section
self.args = (option, section) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, option, section, msg):
Error.__init__(self, msg)
self.option = option
self.section = section
self.args = (option, section, msg) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, option, section, rawval, reference):
msg = ("Bad value substitution:\n"
"\tsection: [%s]\n"
"\toption : %s\n"
"\tkey : %s\n"
"\trawval : %s\n"
% (section, option, reference, rawval))
InterpolationError.__ini... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, option, section, rawval):
msg = ("Value interpolation too deeply recursive:\n"
"\tsection: [%s]\n"
"\toption : %s\n"
"\trawval : %s\n"
% (section, option, rawval))
InterpolationError.__init__(self, option, section, msg)
... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, source=None, filename=None):
# Exactly one of `source'/`filename' arguments has to be given.
# `filename' kept for compatibility.
if filename and source:
raise ValueError("Cannot specify both `filename' and `source'. "
"Use `source'.")
... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def filename(self):
"""Deprecated, use `source'."""
warnings.warn(
"The 'filename' attribute will be removed in future versions. "
"Use 'source' instead.",
DeprecationWarning, stacklevel=2
)
return self.source | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def filename(self, value):
"""Deprecated, user `source'."""
warnings.warn(
"The 'filename' attribute will be removed in future versions. "
"Use 'source' instead.",
DeprecationWarning, stacklevel=2
)
self.source = value | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, filename, lineno, line):
Error.__init__(
self,
'File contains no section headers.\nfile: %r, line: %d\n%r' %
(filename, lineno, line))
self.source = filename
self.lineno = lineno
self.line = line
self.args = (filename, lineno... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def before_get(self, parser, section, option, value, defaults):
return value | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def before_read(self, parser, section, option, value):
return value | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def before_get(self, parser, section, option, value, defaults):
L = []
self._interpolate_some(parser, option, L, value, section, defaults, 1)
return ''.join(L) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def _interpolate_some(self, parser, option, accum, rest, section, map,
depth):
if depth > MAX_INTERPOLATION_DEPTH:
raise InterpolationDepthError(option, section, rest)
while rest:
p = rest.find("%")
if p < 0:
accum.append(rest... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def before_get(self, parser, section, option, value, defaults):
L = []
self._interpolate_some(parser, option, L, value, section, defaults, 1)
return ''.join(L) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def _interpolate_some(self, parser, option, accum, rest, section, map,
depth):
if depth > MAX_INTERPOLATION_DEPTH:
raise InterpolationDepthError(option, section, rest)
while rest:
p = rest.find("$")
if p < 0:
accum.append(rest... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def before_get(self, parser, section, option, value, vars):
rawval = value
depth = MAX_INTERPOLATION_DEPTH
while depth: # Loop through this until it's done
depth -= 1
if value and "%(" in value:
replace = functools.partial(self._interpol... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def _interpolation_replace(match, parser):
s = match.group(1)
if s is None:
return match.group()
else:
return "%%(%s)s" % parser.optionxform(s) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, defaults=None, dict_type=_default_dict,
allow_no_value=False, *, delimiters=('=', ':'),
comment_prefixes=('#', ';'), inline_comment_prefixes=None,
strict=True, empty_lines_in_values=True,
default_section=DEFAULTSECT,
... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def sections(self):
"""Return a list of section names, excluding [DEFAULT]"""
# self._sections will never have [DEFAULT] in it
return list(self._sections.keys()) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def has_section(self, section):
"""Indicate whether the named section is present in the configuration.
The DEFAULT section is not acknowledged.
"""
return section in self._sections | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def read(self, filenames, encoding=None):
"""Read and parse a filename or a list of filenames.
Files that cannot be opened are silently ignored; this is
designed so that you can specify a list of potential
configuration file locations (e.g. current directory, user's
home directo... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def read_string(self, string, source='<string>'):
"""Read configuration from a given string."""
sfile = io.StringIO(string)
self.read_file(sfile, source) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def readfp(self, fp, filename=None):
"""Deprecated, use read_file instead."""
warnings.warn(
"This method will be removed in future versions. "
"Use 'parser.read_file()' instead.",
DeprecationWarning, stacklevel=2
)
self.read_file(fp, source=filename) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def _get(self, section, conv, option, **kwargs):
return conv(self.get(section, option, **kwargs)) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def getfloat(self, section, option, *, raw=False, vars=None,
fallback=_UNSET):
try:
return self._get(section, float, option, raw=raw, vars=vars)
except (NoSectionError, NoOptionError):
if fallback is _UNSET:
raise
else:
... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def items(self, section=_UNSET, raw=False, vars=None):
"""Return a list of (name, value) tuples for each option in a section.
All % interpolations are expanded in the return values, based on the
defaults passed into the constructor, unless the optional argument
`raw' is true. Additiona... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def optionxform(self, optionstr):
return optionstr.lower() | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def set(self, section, option, value=None):
"""Set an option."""
if value:
value = self._interpolation.before_set(self, section, option,
value)
if not section or section == self.default_section:
sectdict = self._defaults
... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def _write_section(self, fp, section_name, section_items, delimiter):
"""Write a single section to the specified `fp'."""
fp.write("[{}]\n".format(section_name))
for key, value in section_items:
value = self._interpolation.before_write(self, section_name, key,
... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def remove_section(self, section):
"""Remove a file section."""
existed = section in self._sections
if existed:
del self._sections[section]
del self._proxies[section]
return existed | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __setitem__(self, key, value):
# To conform with the mapping protocol, overwrites existing values in
# the section.
# XXX this is not atomic if read_dict fails at any point. Then again,
# no update method in configparser is atomic in this implementation.
if key == self.defau... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __contains__(self, key):
return key == self.default_section or self.has_section(key) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __iter__(self):
# XXX does it break when underlying container state changed?
return itertools.chain((self.default_section,), self._sections.keys()) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def _join_multiline_values(self):
defaults = self.default_section, self._defaults
all_sections = itertools.chain((defaults,),
self._sections.items())
for section, options in all_sections:
for name, val in options.items():
if isin... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def _unify_values(self, section, vars):
"""Create a sequence of lookups with 'vars' taking priority over
the 'section' which takes priority over the DEFAULTSECT.
"""
sectiondict = {}
try:
sectiondict = self._sections[section]
except KeyError:
if s... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def _validate_value_types(self, *, section="", option="", value=""):
"""Raises a TypeError for non-string values.
The only legal non-string value if we allow valueless
options is None, so we need to check if the value is a
string if:
- we do not allow valueless options, or
... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def set(self, section, option, value=None):
"""Set an option. Extends RawConfigParser.set by validating type and
interpolation syntax on the value."""
self._validate_value_types(option=option, value=value)
super().set(section, option, value) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
warnings.warn(
"The SafeConfigParser class has been renamed to ConfigParser "
"in Python 3.2. This alias will be removed in future versions."
" Use ConfigParser directly instead.",
Depr... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, parser, name):
"""Creates a view on a section of the specified `name` in `parser`."""
self._parser = parser
self._name = name | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __getitem__(self, key):
if not self._parser.has_option(self._name, key):
raise KeyError(key)
return self._parser.get(self._name, key) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __delitem__(self, key):
if not (self._parser.has_option(self._name, key) and
self._parser.remove_option(self._name, key)):
raise KeyError(key) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __len__(self):
return len(self._options()) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def _options(self):
if self._name != self._parser.default_section:
return self._parser.options(self._name)
else:
return self._parser.defaults() | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def getint(self, option, fallback=None, *, raw=False, vars=None):
return self._parser.getint(self._name, option, raw=raw, vars=vars,
fallback=fallback) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def getboolean(self, option, fallback=None, *, raw=False, vars=None):
return self._parser.getboolean(self._name, option, raw=raw, vars=vars,
fallback=fallback) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def parser(self):
# The parser object of the proxy is read-only.
return self._parser | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def name(self):
# The name of the section on a proxy is read-only.
return self._name | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, msg=''):
self.message = msg
Exception.__init__(self, msg) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, section):
Error.__init__(self, 'No section: %r' % (section,))
self.section = section
self.args = (section, ) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, section, source=None, lineno=None):
msg = [repr(section), " already exists"]
if source is not None:
message = ["While reading from ", repr(source)]
if lineno is not None:
message.append(" [line {0:2d}]".format(lineno))
message.append... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, section, option, source=None, lineno=None):
msg = [repr(option), " in section ", repr(section),
" already exists"]
if source is not None:
message = ["While reading from ", repr(source)]
if lineno is not None:
message.append(" [lin... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, option, section):
Error.__init__(self, "No option %r in section: %r" %
(option, section))
self.option = option
self.section = section
self.args = (option, section) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, option, section, msg):
Error.__init__(self, msg)
self.option = option
self.section = section
self.args = (option, section, msg) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, option, section, rawval, reference):
msg = ("Bad value substitution:\n"
"\tsection: [%s]\n"
"\toption : %s\n"
"\tkey : %s\n"
"\trawval : %s\n"
% (section, option, reference, rawval))
InterpolationError.__ini... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, option, section, rawval):
msg = ("Value interpolation too deeply recursive:\n"
"\tsection: [%s]\n"
"\toption : %s\n"
"\trawval : %s\n"
% (section, option, rawval))
InterpolationError.__init__(self, option, section, msg)
... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, source=None, filename=None):
# Exactly one of `source'/`filename' arguments has to be given.
# `filename' kept for compatibility.
if filename and source:
raise ValueError("Cannot specify both `filename' and `source'. "
"Use `source'.")
... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def filename(self):
"""Deprecated, use `source'."""
warnings.warn(
"The 'filename' attribute will be removed in future versions. "
"Use 'source' instead.",
DeprecationWarning, stacklevel=2
)
return self.source | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def filename(self, value):
"""Deprecated, user `source'."""
warnings.warn(
"The 'filename' attribute will be removed in future versions. "
"Use 'source' instead.",
DeprecationWarning, stacklevel=2
)
self.source = value | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, filename, lineno, line):
Error.__init__(
self,
'File contains no section headers.\nfile: %r, line: %d\n%r' %
(filename, lineno, line))
self.source = filename
self.lineno = lineno
self.line = line
self.args = (filename, lineno... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def before_get(self, parser, section, option, value, defaults):
return value | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def before_read(self, parser, section, option, value):
return value | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def before_get(self, parser, section, option, value, defaults):
L = []
self._interpolate_some(parser, option, L, value, section, defaults, 1)
return ''.join(L) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def _interpolate_some(self, parser, option, accum, rest, section, map,
depth):
if depth > MAX_INTERPOLATION_DEPTH:
raise InterpolationDepthError(option, section, rest)
while rest:
p = rest.find("%")
if p < 0:
accum.append(rest... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def before_get(self, parser, section, option, value, defaults):
L = []
self._interpolate_some(parser, option, L, value, section, defaults, 1)
return ''.join(L) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def _interpolate_some(self, parser, option, accum, rest, section, map,
depth):
if depth > MAX_INTERPOLATION_DEPTH:
raise InterpolationDepthError(option, section, rest)
while rest:
p = rest.find("$")
if p < 0:
accum.append(rest... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def before_get(self, parser, section, option, value, vars):
rawval = value
depth = MAX_INTERPOLATION_DEPTH
while depth: # Loop through this until it's done
depth -= 1
if value and "%(" in value:
replace = functools.partial(self._interpol... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def _interpolation_replace(match, parser):
s = match.group(1)
if s is None:
return match.group()
else:
return "%%(%s)s" % parser.optionxform(s) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, defaults=None, dict_type=_default_dict,
allow_no_value=False, *, delimiters=('=', ':'),
comment_prefixes=('#', ';'), inline_comment_prefixes=None,
strict=True, empty_lines_in_values=True,
default_section=DEFAULTSECT,
... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def sections(self):
"""Return a list of section names, excluding [DEFAULT]"""
# self._sections will never have [DEFAULT] in it
return list(self._sections.keys()) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def has_section(self, section):
"""Indicate whether the named section is present in the configuration.
The DEFAULT section is not acknowledged.
"""
return section in self._sections | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def read(self, filenames, encoding=None):
"""Read and parse a filename or a list of filenames.
Files that cannot be opened are silently ignored; this is
designed so that you can specify a list of potential
configuration file locations (e.g. current directory, user's
home directo... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def read_string(self, string, source='<string>'):
"""Read configuration from a given string."""
sfile = io.StringIO(string)
self.read_file(sfile, source) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def readfp(self, fp, filename=None):
"""Deprecated, use read_file instead."""
warnings.warn(
"This method will be removed in future versions. "
"Use 'parser.read_file()' instead.",
DeprecationWarning, stacklevel=2
)
self.read_file(fp, source=filename) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def _get(self, section, conv, option, **kwargs):
return conv(self.get(section, option, **kwargs)) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def getfloat(self, section, option, *, raw=False, vars=None,
fallback=_UNSET):
try:
return self._get(section, float, option, raw=raw, vars=vars)
except (NoSectionError, NoOptionError):
if fallback is _UNSET:
raise
else:
... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def items(self, section=_UNSET, raw=False, vars=None):
"""Return a list of (name, value) tuples for each option in a section.
All % interpolations are expanded in the return values, based on the
defaults passed into the constructor, unless the optional argument
`raw' is true. Additiona... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def optionxform(self, optionstr):
return optionstr.lower() | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def set(self, section, option, value=None):
"""Set an option."""
if value:
value = self._interpolation.before_set(self, section, option,
value)
if not section or section == self.default_section:
sectdict = self._defaults
... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def _write_section(self, fp, section_name, section_items, delimiter):
"""Write a single section to the specified `fp'."""
fp.write("[{}]\n".format(section_name))
for key, value in section_items:
value = self._interpolation.before_write(self, section_name, key,
... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def remove_section(self, section):
"""Remove a file section."""
existed = section in self._sections
if existed:
del self._sections[section]
del self._proxies[section]
return existed | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __setitem__(self, key, value):
# To conform with the mapping protocol, overwrites existing values in
# the section.
# XXX this is not atomic if read_dict fails at any point. Then again,
# no update method in configparser is atomic in this implementation.
if key == self.defau... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __contains__(self, key):
return key == self.default_section or self.has_section(key) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __iter__(self):
# XXX does it break when underlying container state changed?
return itertools.chain((self.default_section,), self._sections.keys()) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def _join_multiline_values(self):
defaults = self.default_section, self._defaults
all_sections = itertools.chain((defaults,),
self._sections.items())
for section, options in all_sections:
for name, val in options.items():
if isin... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def _unify_values(self, section, vars):
"""Create a sequence of lookups with 'vars' taking priority over
the 'section' which takes priority over the DEFAULTSECT.
"""
sectiondict = {}
try:
sectiondict = self._sections[section]
except KeyError:
if s... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def _validate_value_types(self, *, section="", option="", value=""):
"""Raises a TypeError for non-string values.
The only legal non-string value if we allow valueless
options is None, so we need to check if the value is a
string if:
- we do not allow valueless options, or
... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def set(self, section, option, value=None):
"""Set an option. Extends RawConfigParser.set by validating type and
interpolation syntax on the value."""
self._validate_value_types(option=option, value=value)
super().set(section, option, value) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
warnings.warn(
"The SafeConfigParser class has been renamed to ConfigParser "
"in Python 3.2. This alias will be removed in future versions."
" Use ConfigParser directly instead.",
Depr... | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __init__(self, parser, name):
"""Creates a view on a section of the specified `name` in `parser`."""
self._parser = parser
self._name = name | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __getitem__(self, key):
if not self._parser.has_option(self._name, key):
raise KeyError(key)
return self._parser.get(self._name, key) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __delitem__(self, key):
if not (self._parser.has_option(self._name, key) and
self._parser.remove_option(self._name, key)):
raise KeyError(key) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def __len__(self):
return len(self._options()) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def _options(self):
if self._name != self._parser.default_section:
return self._parser.options(self._name)
else:
return self._parser.defaults() | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def getint(self, option, fallback=None, *, raw=False, vars=None):
return self._parser.getint(self._name, option, raw=raw, vars=vars,
fallback=fallback) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def getboolean(self, option, fallback=None, *, raw=False, vars=None):
return self._parser.getboolean(self._name, option, raw=raw, vars=vars,
fallback=fallback) | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
def parser(self):
# The parser object of the proxy is read-only.
return self._parser | ArcherSys/ArcherSys | [
3,
2,
3,
16,
1412356452
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.