Re: [Rest2web-develop] ConfigObj 4 Beta 1
Brought to you by:
mjfoord
From: Nicola L. <ni...@te...> - 2005-08-25 08:33:00
|
> 3a. the two doctests in the ConfigObj class docstring should raise > DuplicateError, but instead raise ConfigObjError; I added "raise_errors = True" to the tests, and changed the expected output to match the new one. >>> 3b. we may want to try minimizing the usage of the isinstance >>> built-in, especially to allow passing dict-like objects that >>> are not subclasses of dict; >> What alternative do you suggest ? >> >> ``IsmappingType`` is hopeless (it returns ``True`` for *any* class). I >> don't think restricting input to dicts or genuine subclasses is too >> restrictive. > That's what he asked for. >> We could assume that any item with a ``__getitem__`` method *and* a >> ``keys`` method will behave like a dictionary ? (I'd be happy with this >> as a solution - but it will need documenting). > Some kind of duck typing, yes, I'll explore current usage. I tried using "dict(value)" in a try...except block, but things are complicated by the fact that both "dict('')" and "dict(())" succeed, returning the empty dict. Let's keep it all as it is; if someone wants to pass in a non-dict-derived dict-like thing, it's their responsibility to convert it to dict first. >>> 6. the "BSD-LICENSE.txt" and the generated HTML files have CRLF >>> line endings, while the sources have LF ones. Also, the >>> "configobj.txt" has LF ones, except for the HTML fragment at the >>> end, that has ten CRLF endings. >> Ok - I can sort this. Committing will remove the carriage returns from >> configobj.txt. > Just updated, and it didn't. :-( I'll fix the files and their svn:eol-style > property. I set the svn:eol-style property on all files in the repository except GIF and JPG images, and removed all CR chars from all the other files. I set all properties to 'LF' instead of 'native'. In this way the files will keep their LF endings on Windows too, instead of being converted back and forth to CRLF. Apart from being The Right Thing (tm), ;-) this will ease your packaging job, and won't create problems with editing: just set SPE to use the original line endings of each file, without changing them. You won't be able to open those files with Notepad anymore, but Wordpad reads them, and correctly writes them, just fine. ;-) Overall, green light to official beta release from me! :-D -- Nicola Larosa - ni...@te... Any fool can talk, but it takes a wise man to listen. -- AccUser on Slashdot, July 2005 |