Easier Classes: Python Classes Without All The Cruft @NorthBayPython
Easier Classes: Python Classes Without All The Cruft  @NorthBayPython
Uploaded November 2018 | Updated September 2026, 1 day ago
Trey Hunner

2018.northbaypython.org/schedule/presentation/5

When bundling up data, sometimes tuples and dictionaries don't quite cut it. Python's classes are powerful tools for data storage and manipulation, but it can take quite a bit of boilerplate code to make a well-behaved Python class. In this talk we're going to discuss how a well-behaved class should work and take a look at a number of helper libraries for creating well-behaved classes.

We'll first see how to make classes with proper string representations, comparability, iterability, and immutability. Then we'll dive into helper tools built-in to the standard library and available in third-party libraries.

We'll look at namedtuple, NamedTuple (not a typo), attrs, and the new Python 3.7 dataclasses.

Most of the libraries discussed in this talk are only available in Python 3, so if you're not using Python 3, hopefully this talk will encourage you to upgrade.

A Python conference north of the Golden Gate


North Bay Python is a single-track conference with a carefully curated set of talks representing the diverse Python community and their different areas of interest.

If a topic is less to your interest, or you've met some people you really want to sit down and chat with, we'll have plenty of areas away from the main theatre to catch up and chat.

Our goal is to keep prices as low as possible. That means we won't be catering lunch. Instead, you can look forward to extra-long lunch breaks you can use to explore all of the great food options around the venue.
Easier Classes: Python Classes Without All The CruftI Take Exception to Your Exceptions: Using Custom Errors to Get Your Point AcrossMap it with Python! Intro to GIS and Python mapping modules.Keynote - Mariatta WijayaRunning Vintage Software: PyPIs Aging Codebase.The Secret Life Of Python - Steve Dower (North Bay Python 2019)Observability For You and Me with OpenTelemetry - Sarah Hudspeth (North Bay Python 2023)Accessibility Matters: Creating a Better WebMake Your Engineering Team A Fabulous Place for Programmers with ADHD and Autism5 Leadership Skills Every Engineer NeedsNo Project Scope Survives Contact with Users - Min Ragan-Kelley - 2026
North Bay Python |

Easier Classes: Python Classes Without All The Cruft

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER