Simplify your (Python) Life

Note: Video is blank for first minute.

Summary

We'll go over some intermediate to advanced topics and consider pros and cons of choosing the simpler approach vs. the possibly more complicated or redundant one. The aim is to reduce the number of language APIs and constructs most programmers have to carry in their head to a smaller and more coherent set. Along the way some best practices will also be discussed that are at a higher level than things that can be flagged by automated syntax checking tools such as pylint, pyflakes, etc.

Description

Following are the topics we'll cover:

  • Language/API design and how warts can creep into even well designed products over time.
  • "Worse is better" approach may be good enough ("satisficing").
  • An eclectic mix of language constructs that usually trip newcomers--and sometimes even experienced programmers--which we'll survey:
    1. new
    2. del
    3. call
    4. slots
    5. classmethod vs. staticmethod
    6. decorators (guidelines for writing your own)
    7. class decorators vs. metaclasses
    8. delegation via getattr
    9. Interfaces and getattr
  • We'll see how delegation and interfaces tie into the thinking behind GoF Design Patterns.