I have a config.cfg which I parse using the python-module ConfigParser. In one section I want to configure assignments of the form fileextension : ClassName
. Parsing results in the following dictionary:
types = {
"extension1" : "ClassName1",
"extension2" : "ClassName2"
}
class_ = eval(types[extension])
foo = class()
eval
是邪恶的,不应使用。
www.un.org/Depts/DGACM/index_spanish.htm 你们是否知道一种充满活力的聚会方式,其中哪类是档案延期的结果?