Secret weapon how to promote your YouTube channel
Get Free YouTube Subscribers, Views and Likes

Write Python code people actually want to use

Follow
Doug Mercer

Sign up for 1on1 coaching at https://dougmercer.dev
—————————————————————————————————————————
Writing code that "works" shouldn't be your end goal. It's really just the start...

In this video, we adapt a clumsy, nonPythonic API into an easy to use, easy to understand Pythonic one. We use magic methods such as _getitem__, __len__, __enter__, and __exit_ to make our objects a context manager and support the len() function and square bracket indexing. And in the end, we turn what once was ugly, difficult to maintain code into something that other developers would actually want to use.

This video is inspired by the wonderful PyCon talk by Raymond Hettinger, "Beyond PEP8". I just wanted a distilled down, 8 minute version that I could share with people.

#python #objectorientedprogramming

Chapters

0:00 Intro
0:38 The Problem
2:23 The Client
4:53 Everything Else
6:27 What did we do?

posted by vladarskok3