A medium article i just published (more to come on this) that captures what i think are the basic pitfalls of getting started with python, would love to hear opinions about it. https://medium.com/@snir-orlanczyk/python-common-pitfalls-and-how-to-avoid-them-c61e0d9ea0ec
it covers the following:
- How does python passes arguments and what to watch for with it? (hint: mutable vs immutable)
- Mutable default arguments
- Python scope rules (and specifically scope shadowing)
- Loop variables in Lambdas (a bug or a feature? or something in between)
- Modifying list while iterating it (seem obvious but how to avoid it)
The above is the detailed content of Python common pitfalls. For more information, please follow other related articles on the PHP Chinese website!
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn