且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

有没有办法保护python中的内置函数?

更新时间:2022-05-08 23:48:40

使用 http://www.pylint.org/

def set():
    pass

将生成此警告:

[W0622,set]重新定义内置的"set"

[W0622, set] Redefining built-in 'set'

您可以在编写文件后在文件上运行它,也可以在例如Vim随身携带.大多数IDE也会生成此类信息

You can run it over your files after you write them, or use it in e.g. Vim as you go. Most IDE's will also generate this sort of information