Known bugs / limitations

If you find some bugs, you are welcome to report them :^)

Please see also the warnings.

Partial unicode handling

Unicode is only partially supported, for example it is not supported to pre-populate the configuration object with unicode(); see not a true dict.

It also assumes all files use the same encoding (default to UTF8, or at least ASCII7).

Not a true dict

The configuration objects do not behave like a true dict, especially:

No type conversion on some methods

Type conversion is not supported, at least, on:

  • pre-population / initialization (ie: IHIHI((), {'a': 'b'}))
  • functions: pop, popitem, setdefault, update
# this will not work as expected (yet)
conf = IHIHI('file.conf', {'pi': 3.14, 'lang': u'中文', u'中文': 'Chinese'})

# as a workaround, use this method
conf = IHIHI('file.conf')
conf['pi'] = 3.14
conf['lang'] = u'中文'
conf[u'中文'] = 'Chinese'

# now the defaults has been set, reparse

# or you can alternatively, carefully specify (utf8) strings on the init
conf = IHIHI('file.conf', {'pi': '3.14', 'lang': u'中文'.encode('utf8'),
       u'中文'.encode('utf8'): 'Chinese'})

# now you can
conf['test'] = u'$pi, $lang, $中文!'

print conf.get_unicode('test') # resolve as: 3.14, 中文, Chinese!

Single-line only

It does not, yet, support line-continuation; that mean your configuration value must fit on one line.