O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

Description

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