brightmart / text_classification

all kinds of text classification models and more with deep learning
MIT License
7.87k stars 2.57k forks source link

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

Open NaelsonDouglas opened 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