wistbean / learn_python3_spider

python爬虫教程系列、从0到1学习python爬虫,包括浏览器抓包,手机APP抓包,如 fiddler、mitmproxy,各种爬虫涉及的模块的使用,如:requests、beautifulSoup、selenium、appium、scrapy等,以及IP代理,验证码识别,Mysql,MongoDB数据库的python使用,多线程多进程爬虫的使用,css 爬虫加密逆向破解,JS爬虫逆向,分布式爬虫,爬虫项目实战实例等
http://fxxkpython.com
MIT License
18.56k stars 3.75k forks source link

removed a pitfall where a built-in name was being shadowed #46

Closed NaelsonDouglas closed 3 years ago

NaelsonDouglas commented 3 years ago

The problem There was a scenario on the code where a Python built-in name was being shadowed. It's a good practice to never replace built-in methods with variables, since it may lead to hard-to-detect bugs in a scenario where the name gets invoked bearing in mind its built-in purpose instead of the newly shadowed purpose.

Solution Changed the variable name