MCPcopy Index your code
hub / github.com/python/cpython / __init__

Method __init__

Lib/configparser.py:231–248  ·  view source on GitHub ↗
(self, section, option, source=None, lineno=None)

Source from the content-addressed store, hash-verified

229 """
230
231 def __init__(self, section, option, source=None, lineno=None):
232 msg = [repr(option), " in section ", repr(section),
233 " already exists"]
234 if source is not None:
235 message = ["While reading from ", repr(source)]
236 if lineno is not None:
237 message.append(" [line {0:2d}]".format(lineno))
238 message.append(": option ")
239 message.extend(msg)
240 msg = message
241 else:
242 msg.insert(0, "Option ")
243 Error.__init__(self, "".join(msg))
244 self.section = section
245 self.option = option
246 self.source = source
247 self.lineno = lineno
248 self.args = (section, option, source, lineno)
249
250
251class NoOptionError(Error):

Callers

nothing calls this directly

Calls 6

appendMethod · 0.45
formatMethod · 0.45
extendMethod · 0.45
insertMethod · 0.45
__init__Method · 0.45
joinMethod · 0.45

Tested by

no test coverage detected