Thursday
9 a.m.–12:20 p.m.

Python Epiphanies

Description

This tutorial is for software developers who've been using Python with
success for a while but are looking for a deeper understanding of the
language. It focuses on how Python differs from other languages in
subtle but important ways that often confuse folks, and it demystifies
a number of language features that are sometimes misunderstood.

Abstract

In many ways Python is very similar to other programming languages.
However, in a few subtle ways it is quite different, and many software
developers new to Python, after their initial successes, hit a plateau
and have difficulty getting past it. Others don't hit or perceive a
plateau, but still find some of Python's features a little mysterious
or confusing. This tutorial will help deconstruct some common
incorrect assumptions about Python.

If in your use of Python you sometimes feel like an outsider, like
you're missing the inside jokes, like you have most of the puzzle
pieces but they don't quite fit together yet, or like there are parts
of Python you don't understand, this may be a good tutorial for you.

After completing this tutorial you'll have a deeper understanding of
many Python features. Here are some of the topics we'll cover:

How objects are created and names are assigned to them

Ways to modify a namespace: assigment, import, function definition,
and class definition. Much of the tutorial is structured around
namespaces and ways to change them to help you understand:

most of the differences between variables in other languages and
Python, including

and why parameters passed to a function can sometimes be changed
by it and sometimes cannot.

Iterables, iterators, and the iterator protocol, including how to
make class instances iterable

How to use generators to make your code easier to read and
understand

Hacking classes after their definition, and creating classes without
a class statement, in order to better understand how they work

Bound versus unbound methods, how they're implemented, and
interesting things you can do with bound methods

How and why you might want to create or use a partial function

Example use-cases of functions as first-class objects

Unpacking and packing arguments with * and ** on function call and
definition

Attendee Requirements

Bring a laptop computer with a recent version of Python 2.7 or Python
3 installed.

Prerequisites

Ideally intermediate ability in Python - you should at least be
comfortable or familiar with classes, objects, methods, iterators, and
generators. The idea of calling a function that's stored in a data
structure should make sense and not be scary.

If you're relatively new to Python put picking it up quickly and are
interested in being stretched, you'll probably keep up with most of
the content.