Python has its share of gotchas and quirks that can surprise both beginner and experienced software developers. This post highlights common Python pitfalls and provides tips for avoiding them.

8m read timeFrom bit.ly
Post cover image
Table of contents
Mutable Default Arguments Are a Bad IdeaNaN (Non-) ReflexivityLate Binding ClosuresReassigning Global VariablesProper Way to Define TuplesIndexing Byte Values Instead of Byte StringsIndexing with Negated VariableWhy Is It Returning None!?Conclusion

Sort: