mozilla/configman — pull request #34 by twobraids (2012-04-03 03:02:51+00:00)
Title: enhanced class list corverter for different formats and extra data 

the class_list_converter had a hard coded comma delimited string format for the class list. This enhancement replaces the hard coding with a function that allows arbitrary alternative formats. There is also the ability to add extra data to go with each class.

sample input:
"""configman.tests.test_converters.Alpha|1|02:00:00
configman.tests.test_converters.Beta|2
configman.tests.test_converters.Gamma|3|03:00:00"""

sample config output:
config
config.cls0
config.cls0.cls == configman.tests.test_converters.Alpha
config.cls0.cls_instance == configman.tests.test_converters.Alpha()
config.cls0.cls.frequency == 1
config.cls0.cls.time == datetime.time(02:00:00)
config
config.cls1
config.cls1.cls == configman.tests.test_converters.Beta
config.cls1.cls_instance == configman.tests.test_converters.Beta()
config.cls1.cls.frequency == 2
config
config.cls2
config.cls2.cls == configman.tests.test_converters.Gamma
config.cls2.cls_instance == configman.tests.test_converters.Gamma()
config.cls2.cls.frequency == 3
config.cls2.cls.time == datetime.time(03:00:00)

See the demo in the test_converters.py in the `test_classes_in_namespaces_converter_5` test.