为什么Python内置库不遵循命名约定?

时间:2017-01-27 01:45:47

标签: python pep8

某些主要的Python内置库中存在此错误。例如:

"foo".startswith("bar") # instead of .starts_with
re.findall("[ab]", "foobar"]) # instead of .find_all

这只是一个兼容性问题吗? PEP 8声明方法名称必须用小写字母写成,并用下划线分隔。

0 个答案:

没有答案
相关问题