ABCs: What are they good for?
Looking before you leap
Python is a duck-typed language, and one where you usually trust EAFP ("Easier to Ask Forgiveness than Permission") over LBYL ("Look Before You Leap").
A standard assembly format for Python bytecode
Background
Currently, CPython’s internal bytecode format stores instructions with no args as 1 byte, instructions with small args as 3 bytes, and instructions with large args as 6 bytes (actually, a 3-byte EXTENDED_ARG followed by a 3-byte real instruction).
Unified call syntax
If you want to skip all the tl;dr and cut to the chase, jump to Concrete Proposal.
8Why heapq isn't a type
Many people, when they first discover the heapq module, have two questions:
Why does it define a bunch of functions instead of a container type? Why don't those functions take a key or reverse parameter, like all the other sorting-related stuff in Python? Why not a type?
At the abstract level, it'
Unpacked Bytecode
Currently, in CPython, if you want to process bytecode, either in C or in Python, it’s pretty complicated.
The built-in peephole optimizer has to do extra work fixing up jump targets and the line-number table, and just punts on many cases because they’re too hard to deal with.
Everything is dynamic
One common "advanced question" on places like StackOverflow and python-list is "how do I dynamically create a function/method/class/whatever"? The standard answer is: first, some caveats about why you probably don't want to do that, and then an explanation of the various ways to do it when you reall
1Views instead of iterators
When the first betas for Swift came out, I was impressed by their collection design. In particular, the way it allows them to write map-style functions that are lazy (like Python 3), but still as full-featured as possible.
2