Python Anti-Patterns
Offered By: EuroPython Conference via YouTube
Course Description
Overview
Explore common anti-patterns in Python programming through this 28-minute conference talk from EuroPython 2021. Discover both general software anti-patterns and Python-specific issues, drawing insights from The Little Book of Python Anti-Patterns. Learn to identify and avoid problematic coding practices, including improper exception handling, misuse of context managers, inconsistent function return types, and inappropriate access of protected class members. Gain valuable knowledge on proper dictionary usage, import practices, variable naming conventions, and type comparisons. Suitable for developers with basic to intermediate Python knowledge, including familiarity with classes, constructors, and parameter usage.
Syllabus
Intro
Help you reach the next level
What exactly is a (design) pattern?
The AntiPattern on the other hand
Categories of the book
No exception type specified
Ignore context managers to handle files
Return more than one variable type in function calls
Accessing a protected member from outside the class
Assigning to built-in function
Using tabs or mixing tabs with spaces
Not using else where appropriate in a loop
Not using get() to return a default value from a dict
Using wildcard imports
Using the global statement
Using single letter to name your variables
Comparing things to True the wrong way
Using type() to compare types
Not using named tuples in function return
Taught by
EuroPython Conference
Related Courses
Learn to Program: Crafting Quality CodeUniversity of Toronto via Coursera 数据结构与算法 Data Structures and Algorithms
Peking University via Coursera 数据结构与算法第一部分 | Data Structures and Algorithms Part 1
Peking University via edX Software Construction in Java
Massachusetts Institute of Technology via edX Advanced Software Construction in Java
Massachusetts Institute of Technology via edX