Docstring update: documented parameters and exceptions of conf.read().

This commit is contained in:
Michael Spang 2007-01-28 22:54:56 -05:00 committed by Michael Spang
parent 45aef63d2b
commit 8577703511
1 changed files with 12 additions and 3 deletions

View File

@ -30,7 +30,7 @@ Example Configuration File:
white space = sure, why not white space = sure, why not
# these two lines are treated as one # these two lines are treated as one
long line = first line \ long line = first line \\
second line second line
Resultant Dictionary: Resultant Dictionary:
@ -44,7 +44,7 @@ Resultant Dictionary:
'arbitrary_string': '2', 'arbitrary_string': '2',
'csclub': None, 'csclub': None,
'white space': 'sure, why not' 'white space': 'sure, why not'
'long line': 'first line \n second line' 'long line': 'first line \\n second line'
... (data from other.cf) ... ... (data from other.cf) ...
} }
@ -58,7 +58,16 @@ class ConfigurationException(Exception):
def read(filename, included=None): def read(filename, included=None):
"""Function to read a configuration file into a dictionary.""" """
Function to read a configuration file into a dictionary.
Parmaeters:
filename - the file to read
included - files previously read (internal)
Exceptions:
ConfigurationException - when the configuration file cannot be read
"""
if not included: if not included:
included = [] included = []