In this Python training course, students already experienced with Python programming will advance their skills through the study of sophisticated Python techniques and practices.
This advanced Python course uses Python 3 as the primary teaching language, with notes on differences between Python 2 and Python 3 provided throughout.
Class Prerequisites:
Students must have practical experience in the following areas to succeed in this course:
- Solid Python programming experience. You should be very comfortable with these fundamentals: working with strings, lists, tuples, and dictionaries; using loops and conditional statements; and writing your own functions.
Experience with the following topics would provide helpful context:
- Basic knowledge of HTML, XML, JSON, and SQL.
Course Outline:
Classes and Objects
- Defining classes and class structure
- The __init__ method and initialization
- Keyword arguments and flexible parameters
Methods
- Instance methods and their use
- Adding arguments to instance methods
- The __str__ method for string representation
- Static methods and their applications
- Class methods and their uses
- Properties and property decorators for controlled access
- The setter method and property modification
- Input validation via setter methods
Inheritance
- The DRY (Don't Repeat Yourself) principle and code reuse
- Single inheritance and parent-child class relationships
- Subclassing classes from Python packages
- Overriding methods in child classes
- Using super() to call parent methods
- Multiple inheritance and its complexities
- Method resolution order and inheritance chains
The Importance of the Standard Library
- High-level and low-level standard library modules
- Navigating and exploring the standard library effectively
- Working with dates and times through datetime objects
- Understanding datetime module capabilities
Interacting with the Operating System
- Accessing system and OS information
- Using pathlib for cross-platform file path handling
- Displaying hidden files in your home directory
- Using the subprocess module to run external processes
Collections
- Counters for counting hashable objects
- defaultdict for automatic default values
- ChainMap for managing multiple dictionaries
Becoming Pythonic
- Using list comprehensions for concise list creation
- Set and dictionary comprehensions
- Comprehensions with multiple iterables
- Default dictionary creation and usage
- Iterators and how they work
- The itertools module for efficient iteration
- Generator functions and lazy evaluation
- Regular expressions for pattern matching and text processing
Software Development
- Debugging techniques and tools for finding issues
- Automated testing approaches and benefits
- Categorizing and organizing tests
- Measuring test coverage
- Writing tests using Python's unittest framework
- Writing tests with the pytest framework