- Number of videos:
Did you know that "for a, (b, c) in s:" is a valid Python line? From the elegant for statement through list/set/dict comprehensions and generator functions, this talk shows how the Iterator pattern is so deeply embedded in the syntax of Python, and so widely supported by its libraries, that some of its most powerful applications can be overlooked by programmers coming from other languages.
Python has no private fields, but the property decorator lets you replace public attributes with getters and setters without breaking client code. And the descriptor mechanism, used in Django for model field declarations, enables wide reuse of getter/setter logic via composition instead of inheritance. This talk explains how properties and descriptors work by refactoring a practical example.
Before Python, Guido was a contributor to the ABC language and environment. ABC was designed to teach programming, and introduced many "Pythonic" ideas: integrated dicts and tuples, structure by indentation, strong typing without declarations etc. With high demand for Python in education, the legacy of ABC is more relevant than ever as we design courses and environments for learners.