Effective Python

Video description

5+ Hours of Video Instruction

Effective Python LiveLessons Video Training offers developers insight into the Pythonic way of writing programs, building on the viewer’s fundamental understanding of Python to help him or her write programs more effectively.


Effective Python LiveLessons Video Training is based on the book Effective Python written by Google software engineer Brett Slatkin for the Effective Software Development Series. Each lesson contains a broad but related set of items. Each item is designed to provide concise and specific guidance on what to do and what to avoid when writing programs using Python. Hands-on demonstration helps the viewer understand how to put each item into action.

Each of the video’s six lessons includes items focused on a key topic. The video starts with items focused on how to make more efficient use of expressions and statements before moving on to lessons that teach viewers how to better use comprehensions and generators, functions, and classes. Next, the training teaches viewers how to solve problems associated with concurrency and parallelism. Finally, the focus switches to how to make Python programs more robust. After watching this video, Python programmers will have the knowledge necessary to really master the language and apply the advice, tips, and tricks learned from the video to the Python programs they’re writing, immediately improving the quality of their code.

The source code repository for this LiveLesson is located at https://github.com/bslatkin/effectivepython/blob/master/VIDEO.md.

About the Instructor

Brett Slatkin is a Senior Staff Software Engineer at Google and the engineering lead and co-founder of Google Consumer Surveys. Slatkin formerly worked on Google App Engine’s Python infrastructure. He is the co-creator of the PubSubHubbub protocol. Nine years ago, he cut his teeth using Python to manage Google’s enormous fleet of servers. Outside of his day job, he works on open source tools and writes about software, bicycles, and other topics on his personal website. He earned his B.S. in Computer Engineering from Columbia University in the City of New York. He lives in San Francisco.

Skill Level

  • Intermediate to Advanced

What You Will Learn

  • Methods for using expressions and statements more efficiently
  • How to make better use of comprehensions and generators
  • How to make better use of functions and classes
  • Methods for working with concurrency and parallelism
  • How to make your programs more robust

Who Should Take This Course

  • Advanced programmers who have a history of programming professionally but are now using Python for a real project.
  • Intermediate programmers who have just learned how to program for the first time using Python and want to gain skills to become more advanced programmers.
  • Non-professional programmers who use Python as part of their jobs. These people have a good working knowledge of Python but are probably missing important fundamentals that would make them more effective.

Course Requirements

  • Intermediate-level knowledge of Python programming
  • Some experience building a Python program

Table of Contents

Lesson 1: Using Expressions and Statements
In the first lesson, you learn how to write programs in the Pythonic style, using methods that will affect every program you write.

Lesson 2: Using Comprehensions and Generators
In Lesson 2, you learn how to use comprehensions and generators to work with and create sequences of values.

Lesson 3: Using Functions
Lesson 3 covers a wide variety of unique capabilities that Python has for writing and calling functions.

Lesson 4: Using Classes
The focus of Lesson 4 is how to put Python's object-oriented capabilities to good use while at the same time avoiding common pitfalls.

Lesson 5: Working with Concurrency and Parallelism
Lesson 5 provides you with insights into Python's built-in facilities for writing programs that do many things at the same time.

Lesson 6: Making Programs Robust
In the final lesson, you learn the best techniques for making sure your programs are bulletproof when they run in production.

About LiveLessons Video Training
The LiveLessons Video Training series publishes hundreds of hands-on, expert-led video tutorials covering a wide selection of technology topics designed to teach you the skills you need to succeed. This professional and personal technology video series features world-leading author instructors published by your trusted technology brands: Addison-Wesley, Cisco Press, IBM Press, Pearson IT Certification, Prentice Hall, Sams, and Que. Topics include: IT Certification, Programming, Web Development, Mobile Development, Home and Office Technologies, Business and Management, and more. View all LiveLessons on InformIT at: http://www.informit.com/livelessons.

Table of contents

  1. Introduction
    1. Effective Python LiveLessons: Introduction
  2. Lesson 1: Using Expressions and Statements
    1. Items
    2. Item 1 Know how to slice sequences
    3. Item 2 Avoid using start, end, and stride in a single slice
    4. Item 3 Prefer ENUMERATE over RANGE
    5. Item 4 Use ZIP to process iterators in parallel
    6. Item 5 Avoid ELSE blocks after FOR and WHILE loops
    7. Item 6 Take advantage of each block in TRY/EXCEPT/ELSE/FINALLY
    8. Item 7 Consider CONTEXTLIB and with statements for reusable TRY/FINALLY behavior
  3. Lesson 2: Using Comprehensions and Generators
    1. Items
    2. Item 8 Use list comprehensions instead of MAP and FILTER
    3. Item 9 Avoid more than two expressions in list comprehensions
    4. Item 10 Consider generator expressions for large comprehensions
    5. Item 11 Consider generators instead of returning lists
    6. Item 12 Be defensive when iterating over arguments
  4. Lesson 3: Using Functions
    1. Items
    2. Item 13 Know how closures interact with variable scope
    3. Item 14 Accept functions for simple interfaces instead of classes
    4. Item 15 Reduce visual noise with variable positional arguments
    5. Item 16 Provide optional behavior with keyword arguments
    6. Item 17 Enforce clarity with keyword-only arguments
    7. Item 18 Use NONE and docstrings to specify dynamic default arguments
  5. Lesson 4: Using Classes
    1. Items
    2. Item 19 Prefer helper classes over bookkeeping with dictionaries and tuples
    3. Item 20 Use plain attributes instead of get and set methods
    4. Item 21 Prefer public attributes over private ones
    5. Item 22 Use @classmethod polymorphism to construct objects generically
  6. Lesson 5: Working with Concurrency and Parallelism
    1. Items
    2. Item 23 Use subprocess to manage child processes
    3. Item 24 Use threads for blocking I/O, avoid for parallelism
    4. Item 25 Use Lock to prevent data races in threads
    5. Item 26 Use Queue to coordinate work between threads
    6. Item 27 Consider concurrent.futures for true parallelism
  7. Lesson 6: Making Programs Robust
    1. Items
    2. Item 28 Use virtual environments for isolated and reproducible dependencies
    3. Item 29 Test everything with unittest
    4. Item 30 Consider interactive debugging with pdb
    5. Item 31 Profile before optimizing
    6. Item 32 Use tracemalloc to understand memory usage and leaks
  8. Summary
    1. Effective Python LiveLessons: Summary

Product information

  • Title: Effective Python
  • Author(s):
  • Release date: August 2015
  • Publisher(s): Pearson
  • ISBN: 0134175247