Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Python Good Practices

EuroPython Conference via YouTube

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore Python best practices and design principles in this 50-minute EuroPython 2013 conference talk. Delve into the ongoing debate between cathedral and bazaar development models, and learn why "one way to do it" is crucial in Python. Examine common pitfalls and how to avoid them, including proper project structure and the use of standard tools like distribute, virtualenv, pip, and zc.buildout. Discover effective techniques for handling dependencies, implementing test isolation, and designing code as if building a library. Gain insights on avoiding black magic practices, structuring application code, implementing lazy initialization, and creating typical command-line interfaces. Address API versioning policies and understand why monkeypatching for testing indicates poor design. Acquire valuable knowledge to enhance your Python development skills and create more maintainable, efficient code.

Syllabus

Introduzione
AN ANCIENT FIGHT Cathedral vs Bazaar
ONE WAY TO DO IT
NOT JUST PYTHON'S OWN FAULTS
SAMPLE PROJECT TREE
USE STANDARD TOOLS distribute, virtualenv, pip, zc.buildout
DON'T Do manipulations, ifs, cycles, fetch libraries, do setup- unrelated things, use nonstandard libraries.
HANDLING DEPENDENCIES That's hard! mytoolib
SUGGESTIONS Use at least a version range
TEST ISOLATION
DESIGN Think you're building a library
NO BLACK MAGIC sys path manipulation is a DON'T
YOUR APPLICATION CODE IS SOMETHING LIKE
LAZY INIT
TYPICAL COMMAND LINE
API VERSIONING POLICY
you're monkeypatching to test your own code - bad use of wiring and dependency injection

Taught by

EuroPython Conference

Reviews

Start your review of Python Good Practices

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.