很奇怪,有3种不同的形式:RawConfigParser,SafeConfigParser和ConfigParser(文档).我读了差异,但为什么不是每个人都使用SafeConfigParser,因为它看起来好,安全吗?我可以理解,在Python 2的情况下,其他两个是为了向后兼容而保留的.
RawConfigParser
SafeConfigParser
ConfigParser
更新:在Python 3.2中,SafeConfigParser已重命名为ConfigParser,旧的ConfigParser已被删除(源代码:Python 3.2的新闻).
python backwards-compatibility python-3.x
backwards-compatibility ×1
python ×1
python-3.x ×1