<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Greg Ewing wrote:
<blockquote cite="mid43FC3D14.4030204@canterbury.ac.nz" type="cite">
  <pre wrap="">Fuzzyman wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">cfg = ConfigObj(newfilename)
cfg['key'] = 'value'
cfg['key2'] = ['value1', 'value2', 'value3']
cfg['section'] = {'key': 'value', 'key2': ['value1', 'value2', 'value3']}
    </pre>
  </blockquote>
  <pre wrap=""><!---->
If the main purpose is to support this kind of notational
convenience, then I'd be inclined to require all the values
used with this API to be concrete strings, lists or dicts.
If you're going to make types part of the API, I think it's
better to do so with a firm hand rather than being half-
hearted and wishy-washy about it.
[snip..]
  </pre>
</blockquote>
Thanks, that's the solution we settled on. We use ``isinstance`` tests
to determine types.<br>
<br>
The user can always do something like :<br>
<br>
&nbsp;&nbsp;&nbsp; cfg['section'] = dict(dict_like_object)<br>
<br>
Which isn't so horrible.<br>
<br>
All the best,<br>
<br>
Michael<br>
<blockquote cite="mid43FC3D14.4030204@canterbury.ac.nz" type="cite">
  <pre wrap="">
--
Greg
_______________________________________________
Python-Dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Python-Dev@python.org">Python-Dev@python.org</a>
<a class="moz-txt-link-freetext" href="http://mail.python.org/mailman/listinfo/python-dev">http://mail.python.org/mailman/listinfo/python-dev</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk">http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk</a>

  </pre>
</blockquote>
<br>
</body>
</html>