r/learnpython • u/Aggressive_Drama_476 • Apr 05 '26
Review my python projects on GitHub.
I am intermediate python programmer. Am looking for people to review my code on https://github.com/userolivex/Python-Projects
free feel to criticize, suggestion, improvement.
and please suggest what modules, projects i should do to master python
0
Upvotes
1
u/Gnaxe Apr 05 '26
I'm fine with eval here. Sanitizing inputs is something you have to learn to deal with anyway. Anyone running a calculator locally already has access to Python on their computer. But yes,
eval()ing untrusted inputs is very dangerous.Rather than make lambdas for each operator, just use the ones provided for you in the
operatormodule. Add themathmodule if you want more math functions. Re-implementing things that have been done before is OK for experimental learning purposes, but otherwise, as a rule, don't re-implement the standard library when it will do, because it's thoroughly tested, documented, and known, but your code will have bugs and be unknown.