Crash into Python

or: Python for Programmers with 3 Hours


Crash into Python is a set of documents/slides that are meant to be used as a teaching aid for bringing programmers from other languages up to speed with Python. It assumes that you have enough familiarity with programming to know what function and class mean, and will recognize that print probably doesn't put ink on paper. More importantly, it assumes that you either have an instructor who is well-versed in Python, or are resourceful enough to find answers for yourself. A number of these slides are designed to trigger questions and discussion, so if it seems like you're missing something, that's a good sign you could be digging deeper.

If you are completely new to programming and would like to start learning with Python, I recommend Learn Python the Hard Way by Zed Shaw. Despite the intimidating title, it is an excellent introduction to programming intended for the complete novice.

What we're going to cover

The general form of Python code. (Slides)
Code Organization
The ways in which Python code can be accessed across files. (Slides)
Functional Programming Features
Language features that support functional program design. Includes closures, decorators, lambdas and generators. (Slides)
Object Oriented Features
Language features that support OO program design. Includes classes, inheritance, abstract base classes and mixins. (Slides)
An introduction to a few of the "magic-methods" that you can implement to allow the Python runtime and standard library to treat your objects like the built-in types. (Slides)

Word of advice on tools

The Python interpreter is a great tool for learning and experimentation. Just run python from your command prompt to get started.

If you want the super-deluxe experience, install bpython. It's a snazzed up version of the interpreter that autocompletes and displays documentation inline as you type.

Chances are, as you write more python code, you're going to want to install some third-party libraries. Currently, the best way to manage Python distributions is through pip, though distutils2/packaging will likely be preferred in the future.


Please submit all feedback, flames and compliments to Stephen.