Python Tips for writing better code
Links: 108 Python Index
Tips for writing better code¶
- Using key in list to check if key is contained in list — Python Anti-Patterns documentation (quantifiedcode.com)
- Asking for permission instead of forgiveness — Python Anti-Patterns documentation (quantifiedcode.com) - I feel this is controversial.
- Not using zip() to iterate over a pair of lists — Python Anti-Patterns documentation (quantifiedcode.com)
- Using the global statement — Python Anti-Patterns documentation (quantifiedcode.com)
- Missing argument to super() — Python Anti-Patterns documentation (quantifiedcode.com)
- Method could be a function — Python Anti-Patterns documentation (quantifiedcode.com)
- Not using get() to return a default value from a dict — Python Anti-Patterns documentation (quantifiedcode.com)
Last updated: 2022-12-18