Python3 annotations

As the commits will testify, this is not my work, I'm only the janitor here :-)

I've brought in @jlowin's Python 3 annotations work, merged some conflicts, and re-added some code that got dropped during the merge.
It'd be nice if the two sets of examples matched.  Suggest using the first pair because, as written, this behaves the same as just `lambda x: x + 3` for both floats and ints